Public bug reported:

If I create a deb with install4j that installs to /opt/test/ - then
lintian crashes:


stain@stain-VirtualBox:~$ lintian 
lintian-test-intermediate-folders_linux_0_1_0.deb 
Can't use an undefined value as an ARRAY reference at 
/usr/share/perl5/Lintian/Collect/Package.pm line 513, <$_[...]> line 2.
warning: collect info md5sums about package lintian-test-intermediate-folders 
failed
warning: skipping check of binary package lintian-test-intermediate-folders


If I make it install to /opt instead, lintian is happy (but reports the missing 
bits as it should):


stain@stain-VirtualBox:~$ lintian 
lintian-test-intermediate-folders_linux_0_2_0.deb 
E: lintian-test-intermediate-folders: changelog-file-missing-in-native-package
W: lintian-test-intermediate-folders: control-file-is-empty md5sums
E: lintian-test-intermediate-folders: no-copyright-file
E: lintian-test-intermediate-folders: description-starts-with-package-name
E: lintian-test-intermediate-folders: extended-description-is-empty
E: lintian-test-intermediate-folders: maintainer-name-missing
E: lintian-test-intermediate-folders: maintainer-address-missing
W: lintian-test-intermediate-folders: no-section-field
W: lintian-test-intermediate-folders: empty-binary-package
E: lintian-test-intermediate-folders: dir-or-file-in-opt opt/test/
W: lintian-test-intermediate-folders: maintainer-script-ignores-errors prerm
W: lintian-test-intermediate-folders: maintainer-script-ignores-errors postinst


This causes install4j debian packages - including install4j to not install in 
Ubuntu Software Centre, as it will report the equivalent of:

The package is of bad quality.
The installation of a package which violates the quality standards isn't 
allowed. This could cause serious problems on your computer. Please contact the 
person or organisation who provided this package file and include the details 
beneath.
Lintian check results for 
/home/scmjpg/Desktop/taverna-workbench-biodiversity-2.5.0-linux_amd64.deb:
Can't use an undefined value as an ARRAY reference at 
/usr/share/perl5/Lintian/Collect/Package.pm line 513, <$_[...]> line 2853.
Can't use an undefined value as an ARRAY reference at 
/usr/share/perl5/Lintian/Collect/Package.pm line 513, <$_[...]> line 2853.
warning: collect info md5sums about package taverna-workbench-biodiversity 
failed
warning: skipping check of binary package taverna-workbench-biodiversity
warning: collect info scripts about package taverna-workbench-biodiversity 
failed
warning: skipping check of binary package taverna-workbench-biodiversity
Can't use an undefined value as an ARRAY reference at 
/usr/share/perl5/Lintian/Collect/Package.pm line 513, <$_[...]> line 2853.
warning: collect info file-info about package taverna-workbench-biodiversity 
failed
warning: skipping check of binary package taverna-workbench-biodiversity

Looking at /usr/share/perl5/Lintian/Collect/Package.pm , the bug seems
to be caused by the deb from install4j not listing the intermediate
directories to the target directory, causing $children{$file} to be
unitialized. This is otherwise initialized as a side-effect of

$children{$parent} = [] unless exists $children{$parent};

but lint does also a special case if the root entry is missing:

    if (!exists($idxh{''})) {
        # The index did not include a "root" dir, so fake one.
        # Note we have to do a copy here, since we will eventually
        # add a "children" field.
        my %cpy = %ROOT_INDEX_TEMPLATE;
        if ($num_idx) {
            $cpy{'uid'} = 0;
            $cpy{'gid'} = 0;
        }
        $idxh{''} = \%cpy;
    }

However no special case is done for the missing intermediate
directories, and the above does not initialize.

Adding so it ends with:

        $idxh{''} = \%cpy;
        $children{''} = [] unless exists $children{''};
    }

Fixes the problem:

stain@stain-VirtualBox:~$ lintian 
lintian-test-intermediate-folders_linux_0_1_0.deb 
E: lintian-test-intermediate-folders: changelog-file-missing-in-native-package
W: lintian-test-intermediate-folders: control-file-is-empty md5sums
E: lintian-test-intermediate-folders: no-copyright-file
E: lintian-test-intermediate-folders: description-starts-with-package-name
E: lintian-test-intermediate-folders: extended-description-is-empty
E: lintian-test-intermediate-folders: maintainer-name-missing
E: lintian-test-intermediate-folders: maintainer-address-missing
W: lintian-test-intermediate-folders: no-section-field
W: lintian-test-intermediate-folders: empty-binary-package
Use of uninitialized value in exists at /usr/share/lintian/checks/files.pm line 
339.
E: lintian-test-intermediate-folders: dir-or-file-in-opt opt/lint-test/
E: lintian-test-intermediate-folders: dir-or-file-in-opt opt/lint-test/test/
W: lintian-test-intermediate-folders: maintainer-script-ignores-errors prerm
W: lintian-test-intermediate-folders: maintainer-script-ignores-errors postinst

and thus after this the deb can be installed in Ubuntu Software Centre.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: lintian 2.5.22ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-32.57-generic 3.13.11.4
Uname: Linux 3.13.0-32-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Aug  1 17:12:48 2014
InstallationDate: Installed on 2014-08-01 (0 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
PackageArchitecture: all
SourcePackage: lintian
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: lintian (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug trusty

** Attachment added: "debian file that fails lintian"
   
https://bugs.launchpad.net/bugs/1351380/+attachment/4167510/+files/lintian-test-intermediate-folders_linux_0_1_0.deb

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1351380

Title:
  Lintian crashes with "undefined value"  if deb lacks intermediate
  directories

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lintian/+bug/1351380/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to