Bug#805076: lintian: Only check PHP modules if they contain a .php file
Package: lintian
Version: 2.5.38
Severity: normal
Tags: patch
Dear Maintainer,
I'm working on packing ROS as part of debian-science. All packages contain a
package.xml as part of the build system. Current lintian gives a
pear-package-without-pkg-php-tools-builddep for every package. The attached
patch only runs the checks in phppear.pm if the package actually contains a .php
file.
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.2.0-1-amd64 (SMP w/12 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages lintian depends on:
ii binutils 2.25.1-7
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+b3
ii libarchive-zip-perl 1.53-1
ii libclass-accessor-perl 0.34-1
ii libclone-perl 0.38-1
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:
pn binutils-multiarch <none>
ii dpkg-dev 1.18.3
ii libhtml-parser-perl 3.71-2
ii libtext-template-perl 1.46-1
ii libyaml-perl 1.15-1
-- no debconf information
>From 0b0677cffded82f3fcb81bef5b8208c7e3b060eb Mon Sep 17 00:00:00 2001
From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Sat, 14 Nov 2015 13:21:56 +0100
Subject: [PATCH] Only check PHP modules if they contain a .php file
---
checks/phppear.pm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/checks/phppear.pm b/checks/phppear.pm
index 0295c37..3ea8bbd 100644
--- a/checks/phppear.pm
+++ b/checks/phppear.pm
@@ -31,6 +31,11 @@ use Lintian::Relation;
sub run {
my ($pkg, $type, $info) = @_;
+ # Only check if package actually contains a .php file.
+ if (join("\n", $info->sorted_index) !~ m/\.php$/i) {
+ return;
+ }
+
my $bdepends = $info->relation('build-depends');
my $package_type = 'unknown';
--
2.6.2
Reply to: