Bug#775355: lintian fails to parse certain packages
Package: lintian
Version: 2.5.22ubuntu1
Severity: normal
Tags: patch
Lintian failed to parse an (unofficial) package throwing Perl errors as seen below. A trivial fix is supplied below.
Can't use an undefined value as an ARRAY reference at /usr/share/perl5/Lintian/Collect/Package.pm line 513, <$_[...]> line 5668.
warning: collect info scripts about package go failed
warning: skipping check of binary package go
Can't use an undefined value as an ARRAY reference at /usr/share/perl5/Lintian/Collect/Package.pm line 513, <$_[...]> line 5668.
warning: collect info ar-info about package go failed
warning: skipping check of binary package go
Can't use an undefined value as an ARRAY reference at /usr/share/perl5/Lintian/Collect/Package.pm line 513, <$_[...]> line 5668.
warning: collect info md5sums about package go failed
warning: skipping check of binary package go
Can't use an undefined value as an ARRAY reference at /usr/share/perl5/Lintian/Collect/Package.pm line 513, <$_[...]> line 5668.
warning: collect info file-info about package go failed
warning: skipping check of binary package go
Suggested fix that allows the package in question be parsed:
diff --git a/Package.pm b/Package.pm.bak
index 7aa424d..2c720b7 100644
--- a/Package.pm
+++ b/Package.pm.bak
@@ -508,7 +508,7 @@ sub _fetch_index_data {
foreach my $file (reverse @sorted) {
# Add them in reverse order - entries in a dir are made
# objects before the dir itself.
- if ($idxh{$file}->{type} eq 'd' && ref($children{$file}) eq 'ARRAY') {
+ if ($idxh{$file}->{type} eq 'd') {
my @children;
for my $cname (sort(@{ $children{$file} })) {
my $child = $idxh{$cname};
-- System Information:
Debian Release: jessie/sid
APT prefers trusty-updates
APT policy: (500, 'trusty-updates'), (500, 'trusty-security'), (500, 'trusty')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.11.0-24-generic (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages lintian depends on:
ii binutils 2.24-5ubuntu3
ii bzip2 1.0.6-5
ii diffstat 1.58-1
ii file 1:5.14-2ubuntu3.2
ii gettext 0.18.3.1-1ubuntu3
ii hardening-includes 2.5ubuntu2.1
ii intltool-debian 0.35.0+20060710.1
ii libapt-pkg-perl 0.1.29build1
ii libarchive-zip-perl 1.30-7
ii libclass-accessor-perl 0.34-1
ii libclone-perl 0.36-1
ii libdpkg-perl 1.17.5ubuntu5.3
ii libemail-valid-perl 1.192-1
ii libfile-basedir-perl 0.03-1fakesync1
ii libipc-run-perl 0.92-1
ii liblist-moreutils-perl 0.33-1build3
ii libparse-debianchangelog-perl 1.2.0-1ubuntu1
ii libtext-levenshtein-perl 0.06~01-2
ii libtimedate-perl 2.3000-1
ii liburi-perl 1.60-1
ii man-db 2.6.7.1-1ubuntu1
ii patchutils 0.3.2-3
ii perl [libdigest-sha-perl] 5.18.2-2ubuntu1
ii t1utils 1.37-2ubuntu1
Versions of packages lintian recommends:
ii libautodie-perl 2.23-1
ii libperlio-gzip-perl 0.18-1build3
ii perl-modules [libautodie-perl] 5.18.2-2ubuntu1
Versions of packages lintian suggests:
pn binutils-multiarch <none>
ii dpkg-dev 1.17.5ubuntu5.3
ii libhtml-parser-perl 3.71-1build1
ii libtext-template-perl 1.46-1
ii libyaml-perl 0.84-1
ii xz-utils 5.1.1alpha+20120614-2ubuntu2
-- no debconf information
Reply to: