Bug#818962: fix the php-script-but-no-phpX-cli-dep error
Package: lintian
Version: 2.5.42.1
Severity: normal
Dear [lintian] Maintainer,
currently lintian fails with this error when a package specifies PHP
dependencies (in particular php-cli) without a version number:
E: tweeper: php-script-but-no-phpX-cli-dep usr/share/php/tweeper/tweeper
N:
N: Packages with PHP scripts must depend on a phpX-cli package such as
N: php5-cli. Note that a dependency on a php-cgi package (such as php5-cgi)
N: is needlessly strict and forces the user to install a package that isn't
N: needed.
N:
N: In some cases a weaker relationship, such as Suggests or Recommends,
N: will be more appropriate.
N:
N: Lintian can only recognize phpX-cli dependencies for values of X that it
N: knows are available in the archive. You will get this warning if you
N: allow, as alternatives, versions of PHP that are so old they're not
N: available in stable. The correct fix in those cases is probably to drop
N: the old alternative. If this package depends on a newer php-cli package
N: that Lintian doesn't know about, please file a bug against Lintian so
N: that it can be updated.
N:
N: Severity: important, Certainty: certain
N:
N: Check: scripts, Type: binary
However the PHP package maintainers recommend[1] just the opposite: to
have PHP dependencies without specifying the PHP version explicitly,
i.e.:
Depends: php-cli, php-curl, php-xsl
instead of:
Depends: php5-cli, php5-curl, php5-xsl
This is a safe thing to do considering that each Debian stable version
is going to ship with only one version of PHP.
So the lintian error should only trigger when the php-cli dependency is
missing, regardless of the PHP version number, the error could read like
this:
E: tweeper: php-script-but-no-php-cli-dep usr/share/php/tweeper/tweeper
N:
N: Packages with PHP scripts must depend on a php-cli package.
N: Note that a dependency on a php-cgi package (such as php5-cgi) is
N: needlessly strict and forces the user to install a package that isn't
N: needed.
N:
N: In some cases a weaker relationship, such as Suggests or Recommends,
N: will be more appropriate.
N:
N: Severity: important, Certainty: certain
N:
N: Check: scripts, Type: binary
[1] http://lists.alioth.debian.org/pipermail/pkg-php-maint/2016-March/015201.html
-----
This bugreport was drafted by Antonio Ospite, so thanks goes to him.
Cheers,
Ondrej
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (900, 'testing'), (800, 'unstable'), (700, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.4.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.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.26-5
ii bzip2 1.0.6-8
ii diffstat 1.61-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 libdata-alias-perl 1.20-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-9
ii libtext-levenshtein-perl 0.13-1
ii libtimedate-perl 2.3000-2
ii liburi-perl 1.71-1
ii libyaml-libyaml-perl 0.41-6+b1
ii man-db 2.7.5-1
ii patchutils 0.3.4-1
ii perl 5.22.1-9
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-9
ii perl-modules-5.22 [libautodie-perl] 5.22.1-9
Versions of packages lintian suggests:
pn binutils-multiarch <none>
ii dpkg-dev 1.18.4
ii libhtml-parser-perl 3.72-1
ii libtext-template-perl 1.46-1
-- no debconf information
Reply to: