Lintian crashes with "undefined value" if deb lacks intermediate directories
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lintian (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
If I create a deb with install4j that installs to /opt/test/ - then lintian crashes:
stain@stain-
Can't use an undefined value as an ARRAY reference at /usr/share/
warning: collect info md5sums about package lintian-
warning: skipping check of binary package lintian-
If I make it install to /opt instead, lintian is happy (but reports the missing bits as it should):
stain@stain-
E: lintian-
W: lintian-
E: lintian-
E: lintian-
E: lintian-
E: lintian-
E: lintian-
W: lintian-
W: lintian-
E: lintian-
W: lintian-
W: lintian-
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/
Can't use an undefined value as an ARRAY reference at /usr/share/
Can't use an undefined value as an ARRAY reference at /usr/share/
warning: collect info md5sums about package taverna-
warning: skipping check of binary package taverna-
warning: collect info scripts about package taverna-
warning: skipping check of binary package taverna-
Can't use an undefined value as an ARRAY reference at /usr/share/
warning: collect info file-info about package taverna-
warning: skipping check of binary package taverna-
Looking at /usr/share/
$children{$parent} = [] unless exists $children{$parent};
but lint does also a special case if the root entry is missing:
if (!exists(
# 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_
if ($num_idx) {
}
$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;
}
Fixes the problem:
stain@stain-
E: lintian-
W: lintian-
E: lintian-
E: lintian-
E: lintian-
E: lintian-
E: lintian-
W: lintian-
W: lintian-
Use of uninitialized value in exists at /usr/share/
E: lintian-
E: lintian-
W: lintian-
W: lintian-
and thus after this the deb can be installed in Ubuntu Software Centre.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: lintian 2.5.22ubuntu1
ProcVersionSign
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)
PackageArchitec
SourcePackage: lintian
UpgradeStatus: No upgrade log present (probably fresh install)
On 2014-08-01 18:23, Stian Soiland-Reyes wrote:
> Public bug reported:
>
> If I create a deb with install4j that installs to /opt/test/ - then
> lintian crashes:
>
> [...]
Hi,
Thanks for the report and the following analysis of the problem.
Should you run into future crash issues with lintian, please consider
filing the bug against lintian upstream.
I have applied a few patches upstream for this issue:
* [f89954f] - Fixes the crash
* [4d6bb4e] - Adds a warning for not having intermediate directories
These are scheduled for inclusion in lintian 2.5.32.
* I am not maintaining the Ubuntu package, so I /cannot/ comment on
whether this will be fixed in / backported to your current Ubuntu
release.
>
> [...]
>
> 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:
>
> [...]
This indeed avoided the crash. However, it would leave the path
structure disconnected causing several checks to report incorrect
results (in particular in Lintian/2.5.28).
Therefore I have solved this differently by constructing all missing
intermediate directories (see [f89954f]), which also trivially allowed
for us to discover/report the missing intermediate directories.
Once again, thanks for the report and the following analysis.
Thanks,
~Niels
[f89954f]: /anonscm. debian. org/cgit/ lintian/ lintian. git/commit/ ?id=f89954f8e87 515c839849c5956 8261be256c7081 /anonscm. debian. org/cgit/ lintian/ lintian. git/commit/ ?id=4d6bb4edd26 d74f675fb5bcad8 53d6e05e7fca3f
https:/
[4d6bb4e]:
https:/
Bug handling:
bug 1351380
tag patch
status fixcommitted