[debhelper-devel] [debhelper] 01/01: dh_install: Fix --exclude of patterns

Niels Thykier nthykier at moszumanska.debian.org
Tue Nov 14 21:51:43 UTC 2017


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

nthykier pushed a commit to branch master
in repository debhelper.

commit 4dc71f1553bb996cce45589c22f8330d341ed4bc
Author: Niels Thykier <niels at thykier.net>
Date:   Tue Nov 14 21:50:30 2017 +0000

    dh_install: Fix --exclude of patterns
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog | 2 ++
 dh_install       | 6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 58ae064..bb4f9c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ debhelper (10.10.8) UNRELEASED; urgency=medium
   * Document that compat 11 is now in its open beta phase.
   * Dh_Getopt: Improve warning message when a package is excluded
     due to profiles or architecture restrictions.
+  * dh_install: Properly allow patterns to be excluded without
+    complaining about missing files.  (Closes: #881658)
 
  -- Niels Thykier <niels at thykier.net>  Sun, 12 Nov 2017 09:55:24 +0000
 
diff --git a/dh_install b/dh_install
index 55eefe4..05bcf76 100755
--- a/dh_install
+++ b/dh_install
@@ -207,7 +207,7 @@ foreach my $package (getpackages()) {
 	};
 
 	foreach my $set (@install) {
-		my ($dest, @filelist);
+		my ($dest, @filelist, @patterns);
 
 		if (@$set > 1) {
 			$dest=pop @$set;
@@ -217,7 +217,9 @@ foreach my $package (getpackages()) {
 		# 2) exclude files matched by the pattern as people could have just
 		#    excluded a single file of a "dir/*"-pattern.
 		# This line below filters entire patterns
-		foreach my $glob (grep { not excludefile($_) } @$set) {
+		@patterns = grep { not excludefile($_) } @{$set};
+		next if not @patterns;
+		foreach my $glob (@patterns) {
 			my @found = glob_expand(\@search_dirs, $glob_error_handler, $glob);
 			push(@filelist, map { tr{/}{/}s; $_ } @found);
 		}

-- 
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