[debhelper-devel] [debhelper] 02/02: dh: Stricter handling of unknown NOOP promises

Niels Thykier nthykier at moszumanska.debian.org
Sat Apr 2 21:52:15 UTC 2016


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

nthykier pushed a commit to branch master
in repository debhelper.

commit 61935e44bba21abaf94fec948bc04e5d76b5a880
Author: Niels Thykier <niels at thykier.net>
Date:   Sat Apr 2 21:51:46 2016 +0000

    dh: Stricter handling of unknown NOOP promises
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog |  2 ++
 dh               | 14 ++++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 56bc202..da0ea99 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ debhelper (9.20160402+unreleased) UNRELEASED; urgency=medium
 
   * d/control: Requre dh-autoreconf (>= 12) to ensure
     non-autotools can be built in compat 10.
+  * dh: In a "PROMISE: DH NOOP" clause, make no assumptions
+    about being able to skip "foo(bar)" if "foo" is not known.
 
  -- Niels Thykier <niels at thykier.net>  Sat, 02 Apr 2016 20:57:18 +0000
 
diff --git a/dh b/dh
index f7321f1..e5d8dd4 100755
--- a/dh
+++ b/dh
@@ -1021,10 +1021,16 @@ sub can_skip {
 
 	foreach my $package (@packages) {
 		foreach my $skipinfo (@skipinfo) {
-			if ($skipinfo=~/^tmp\((.*)\)$/) {
-				my $need=$1;
-				my $tmp=tmpdir($package);
-				return 0 if -e "$tmp/$need";
+			if ($skipinfo=~/^([a-zA-Z0-9-_]+)\((.*)\)$/) {
+				my $type = $1;
+				my $need = $2;
+				if ($type eq 'tmp') {
+					my $tmp = tmpdir($package);
+					return 0 if -e "$tmp/$need";
+				} else {
+					# Unknown hint - make no assumptions
+					return 0;
+				}
 			}
 			elsif (pkgfile($package, $skipinfo) ne '') {
 				return 0;

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




More information about the debhelper-devel mailing list