[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#805076: lintian: Only check PHP modules if they contain a .php file



Thanks, I've updated the patch.

Cheers Jochen
From 8a374dadc68cd9545d06a17b55e6d6aa2a890a7e Mon Sep 17 00:00:00 2001
From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Sun, 14 Aug 2016 20:36:29 +0200
Subject: [PATCH] Don't check package if it doesn't contain a .php file

---
 checks/phppear.pm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/checks/phppear.pm b/checks/phppear.pm
index 339554b..8b355c2 100644
--- a/checks/phppear.pm
+++ b/checks/phppear.pm
@@ -28,9 +28,16 @@ use autodie;
 use Lintian::Tags qw(tag);
 use Lintian::Relation;
 
+use List::MoreUtils qw(none);
+
 sub run {
     my ($pkg, $type, $info) = @_;
 
+    # Don't check package if it doesn't contain a .php file
+    if (none { $_ =~ m/\.php$/i } $info->sorted_index) {
+        return;
+    }
+
     my $bdepends = $info->relation('build-depends');
     my $package_type = 'unknown';
 
-- 
2.8.1

Attachment: signature.asc
Description: PGP signature


Reply to: