[lintian] 01/02: c/phppear: Skip if package does not contain a .php file
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit d95f91ea283b705baf8186a2d3ea5a6c802d222b
Author: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Sun Aug 14 20:36:29 2016 +0200
c/phppear: Skip if package does not contain a .php file
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/phppear.pm | 7 +++++++
debian/changelog | 4 +++-
t/tests/phppear-composer/upstream/foo.php | 0
t/tests/phppear-general/upstream/foo.php | 0
t/tests/phppear-pear/upstream/foo.php | 0
t/tests/phppear-pearok/upstream/foo.php | 0
6 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/checks/phppear.pm b/checks/phppear.pm
index 339554b..3520691 100644
--- a/checks/phppear.pm
+++ b/checks/phppear.pm
@@ -25,12 +25,19 @@ use warnings;
use autodie;
+use List::MoreUtils qw(none);
+
use Lintian::Tags qw(tag);
use Lintian::Relation;
sub run {
my ($pkg, $type, $info) = @_;
+ # Don't check package if it doesn't contain a .php file
+ if (none { $_->basename =~ m/\.php$/i } $info->sorted_index) {
+ return;
+ }
+
my $bdepends = $info->relation('build-depends');
my $package_type = 'unknown';
diff --git a/debian/changelog b/debian/changelog
index 6528b95..c093c3d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,8 +20,10 @@ lintian (2.5.47) UNRELEASED; urgency=medium
+ [JW] Fix typo.
* checks/patch-systems.desc:
+ [JW] Fix formatting of some filenames.
- * checks/phppear.desc:
+ * checks/phppear.{desc,pm}:
+ [JW] Fix typo.
+ + [NT] Apply patch from Jochen Sprickerhof to skip this check if the
+ package does not contain any php files. (Closes: #805076)
* checks/rules.desc:
+ [JW] Fix typo.
* checks/shared-libs.desc:
diff --git a/t/tests/phppear-composer/upstream/foo.php b/t/tests/phppear-composer/upstream/foo.php
new file mode 100644
index 0000000..e69de29
diff --git a/t/tests/phppear-general/upstream/foo.php b/t/tests/phppear-general/upstream/foo.php
new file mode 100644
index 0000000..e69de29
diff --git a/t/tests/phppear-pear/upstream/foo.php b/t/tests/phppear-pear/upstream/foo.php
new file mode 100644
index 0000000..e69de29
diff --git a/t/tests/phppear-pearok/upstream/foo.php b/t/tests/phppear-pearok/upstream/foo.php
new file mode 100644
index 0000000..e69de29
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: