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

[lintian] 01/05: checks/debhelper.pm: Update the dh-exec feature checks



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 5a2ba66f766c8833bbf4546e25e299f4a7633cbe
Author: Gergely Nagy <algernon@madhouse-project.org>
Date:   Tue Oct 6 11:54:07 2015 +0200

    checks/debhelper.pm: Update the dh-exec feature checks
    
    Update the dh-exec feature checks to notice the arch and build profile
    filters too, and not emit dh-exec-script-without-dh-exec-features if
    these are used.
    
    Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/debhelper.pm                                       | 6 ++++--
 t/tests/debhelper-dh-exec/debian/debian/{install => dirs} | 0
 t/tests/debhelper-dh-exec/debian/debian/install           | 2 +-
 t/tests/debhelper-dh-exec/debian/debian/rules             | 1 +
 t/tests/debhelper-dh-exec/tags                            | 2 +-
 5 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/checks/debhelper.pm b/checks/debhelper.pm
index f40f8ab..59c1341 100644
--- a/checks/debhelper.pm
+++ b/checks/debhelper.pm
@@ -481,7 +481,7 @@ sub _check_dh_exec {
         tag 'dh-exec-private-helper', $path;
     }
 
-    my ($dhe_subst, $dhe_install) = (0, 0);
+    my ($dhe_subst, $dhe_install, $dhe_filter) = (0, 0, 0);
     my $fd = $path->open;
     while (<$fd>) {
         if (/\$\{([^\}]+)\}/) {
@@ -499,10 +499,12 @@ sub _check_dh_exec {
             }
         }
         $dhe_install = 1 if / => /;
+        $dhe_filter = 1 if /\[[^\]]+\]/;
+        $dhe_filter = 1 if /<[^>]+>/;
     }
     close($fd);
 
-    if (!($dhe_subst || $dhe_install)) {
+    if (!($dhe_subst || $dhe_install || $dhe_filter)) {
         tag 'dh-exec-script-without-dh-exec-features', $path;
     }
 
diff --git a/t/tests/debhelper-dh-exec/debian/debian/install b/t/tests/debhelper-dh-exec/debian/debian/dirs
similarity index 100%
copy from t/tests/debhelper-dh-exec/debian/debian/install
copy to t/tests/debhelper-dh-exec/debian/debian/dirs
diff --git a/t/tests/debhelper-dh-exec/debian/debian/install b/t/tests/debhelper-dh-exec/debian/debian/install
index bc147d0..819be1a 100755
--- a/t/tests/debhelper-dh-exec/debian/debian/install
+++ b/t/tests/debhelper-dh-exec/debian/debian/install
@@ -1,2 +1,2 @@
 #! /usr/bin/dh-exec
-usr/lib
+usr/lib/foo [linux-any] [hurd-any] [kfreebsd-any]
diff --git a/t/tests/debhelper-dh-exec/debian/debian/rules b/t/tests/debhelper-dh-exec/debian/debian/rules
index 4d45dbe..2c54696 100755
--- a/t/tests/debhelper-dh-exec/debian/debian/rules
+++ b/t/tests/debhelper-dh-exec/debian/debian/rules
@@ -7,4 +7,5 @@ override_dh_installman:
 
 override_dh_install:
 
+override_dh_installdirs:
 override_dh_link:
diff --git a/t/tests/debhelper-dh-exec/tags b/t/tests/debhelper-dh-exec/tags
index 2d0786a..b418aee 100644
--- a/t/tests/debhelper-dh-exec/tags
+++ b/t/tests/debhelper-dh-exec/tags
@@ -2,4 +2,4 @@ E: debhelper-dh-exec source: dh-exec-install-not-allowed-here debian/links
 E: debhelper-dh-exec source: dh-exec-private-helper debian/manpages
 E: debhelper-dh-exec source: package-uses-dh-exec-but-lacks-build-depends
 I: debhelper-dh-exec source: dh-exec-subst-unknown-variable debian/manpages DEB_BUILD_WHATEVER
-W: debhelper-dh-exec source: dh-exec-script-without-dh-exec-features debian/install
+W: debhelper-dh-exec source: dh-exec-script-without-dh-exec-features debian/dirs

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: