Bug#807695: lintian: false positive for command-with-path-in-maintainer-script
Package: lintian
Version: 2.5.38.1
Severity: normal
I got a false positive for FusionForge in sid:
W: gforge-db-postgresql: command-with-path-in-maintainer-script postinst:8 /usr/bin/pg_lsclusters
[…]
N: See particularly the function pathfind() in devref.
The line in question:
if [ -x /usr/bin/pg_lsclusters ]; then
OK, I looked into devref, and it explicitly says:
If you need to check for the existence of a command, you should
use something like
if [ -x /usr/sbin/install-docs ]; then ...
But, huh? Turns out lintian false-positives that as well:
$ perl -e '$cmd = "if [ -x /usr/bin/pg_lsclusters ]; then"; if($cmd =~ m{\[\s+(?:!\s+)? -x \s+(/(?:usr/)?s?bin/[\w.+-]+)\s+ \]}xsm){print "true\n";}else{print "false\n";}'
true
$ perl -e '$cmd = "if [ -x /usr/sbin/install-docs ]; then"; if($cmd =~ m{\[\s+(?:!\s+)? -x \s+(/(?:usr/)?s?bin/[\w.+-]+)\s+ \]}xsm){print "true\n";}else{print "false\n";}'
true
This doesn’t happen in wheezy but in sid.
-- System Information:
Debian Release: stretch/sid
APT prefers unreleased
APT policy: (500, 'unreleased'), (500, 'buildd-unstable'), (500, 'unstable')
Architecture: x32 (x86_64)
Foreign Architectures: i386, amd64
Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/lksh
Init: sysvinit (via /sbin/init)
Versions of packages lintian depends on:
ii binutils 2.25.90.20151209-1
ii bzip2 1.0.6-8
ii diffstat 1.60-1
ii file 1:5.25-2
ii gettext 0.19.6-1
ii hardening-includes 2.7
ii intltool-debian 0.35.0+20060710.4
ii libapt-pkg-perl 0.1.29+b4
ii libarchive-zip-perl 1.55-1
ii libclass-accessor-perl 0.34-1
ii libclone-perl 0.38-1
ii libdigest-sha-perl 5.95-2
ii libdpkg-perl 1.18.3
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
ii libparse-debianchangelog-perl 1.2.0-8
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 [libdigest-sha-perl] 5.20.2-6
ii t1utils 1.38-4
ii xz-utils 5.1.1alpha+20120614-2.1
Versions of packages lintian recommends:
ii dpkg 1.18.3
pn libperlio-gzip-perl <none>
ii perl 5.20.2-6
ii perl-modules [libautodie-perl] 5.20.2-6
Versions of packages lintian suggests:
ii binutils-multiarch 2.25.90.20151209-1
ii dpkg-dev 1.18.3
ii libhtml-parser-perl 3.71-2
pn libtext-template-perl <none>
ii libyaml-perl 1.15-1
-- no debconf information
Reply to: