Bug#810649: lintian: maintainer-name-missing leads to Perl error
Package: lintian
Version: 2.5.39.1
Severity: minor
Tags: patch
Using lintian on one of the .deb files provided by the htmltidy
upstream¹ gives a lot of warnings about flaws in their efforts to
debianise the software, but also outputs a Perl error:
$ lintian tidy-5.1.25-64bit.deb
[...]
E: tidy: extended-description-is-empty
E: tidy: maintainer-name-missing maintainer@htacg.org
Use of uninitialized value $name in pattern match (m//) at /usr/share/perl5/Lintian/Check.pm line 215
W: tidy: unknown-section Libraries
[...]
and indeed /usr/share/perl5/Lintian/Check.pm has:
143 if (not $mail and $name =~ m/@/) {
144 # Name probably missing and address has no <>.
145 $mail = $name;
146 $name = undef;
147 }
215 if (
215 ($mail eq 'debian-qa@lists.debian.org')
217 or ( $name =~ /\bdebian\s+qa\b/i
218 and $mail ne 'packages@qa.debian.org')
219 ) {
My patch resets $name to the empty string instead of undef. Mind you,
in theory you should also avoid merely checking whether $name is true,
since I might legally change my name by deed poll to "0"...
[1] specifically,
http://binaries.html-tidy.org/binaries/tidy-5.1.25/tidy-5.1.25-64bit.deb
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (990, 'testing'), (50, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 4.4.0-rc8-686-pae (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages lintian depends on:
ii binutils 2.25.90.20160101-1
ii bzip2 1.0.6-8
ii diffstat 1.60-1
ii file 1:5.25-2
ii gettext 0.19.7-2
ii hardening-includes 2.8+nmu2
ii intltool-debian 0.35.0+20060710.4
ii libapt-pkg-perl 0.1.29+b5
ii libarchive-zip-perl 1.56-2
ii libclass-accessor-perl 0.34-1
ii libclone-perl 0.38-1+b1
ii libdpkg-perl 1.18.4
ii libemail-valid-perl 1.198-1
ii libfile-basedir-perl 0.07-1
ii libipc-run-perl 0.94-1
ii liblist-moreutils-perl 0.413-1+b1
ii libparse-debianchangelog-perl 1.2.0-8
ii libperl5.22 [libdigest-sha-perl] 5.22.1-3
ii libtext-levenshtein-perl 0.13-1
ii libtimedate-perl 2.3000-2
ii liburi-perl 1.69-1
ii man-db 2.7.5-1
ii patchutils 0.3.4-1
ii perl 5.22.1-3
ii t1utils 1.39-2
ii xz-utils 5.1.1alpha+20120614-2.1
Versions of packages lintian recommends:
ii dpkg 1.18.4
ii libperlio-gzip-perl 0.19-1+b1
ii perl 5.22.1-3
ii perl-modules-5.22 [libautodie-perl] 5.22.1-3
Versions of packages lintian suggests:
pn binutils-multiarch <none>
ii dpkg-dev 1.18.4
ii libhtml-parser-perl 3.71-2+b1
pn libtext-template-perl <none>
ii libyaml-perl 1.15-1
-- no debconf information
--
JBR with qualifications in linguistics, experience as a Debian
sysadmin, and probably no clue about this particular package
diff -ru lintian-2.5.39.1.pristine/lib/Lintian/Check.pm lintian-2.5.39.1/lib/Lintian/Check.pm
--- lintian-2.5.39.1.pristine/lib/Lintian/Check.pm 2015-12-03 10:37:07.000000000 +0000
+++ lintian-2.5.39.1/lib/Lintian/Check.pm 2016-01-10 20:00:47.357942625 +0000
@@ -144,7 +144,7 @@
if (not $mail and $name =~ m/@/) {
# Name probably missing and address has no <>.
$mail = $name;
- $name = undef;
+ $name = '';
}
# Some basic tests.
Reply to: