diff options
author | Niels Thykier <niels@thykier.net> | 2017-11-14 21:50:30 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2017-11-14 21:50:30 +0000 |
commit | 4dc71f1553bb996cce45589c22f8330d341ed4bc (patch) | |
tree | 48f9b6f35e1c96d39fc731730862c44e675fa6f2 | |
parent | 9a1d01d48be3b23ae7371a6aa8fe0a7a0125460e (diff) | |
download | debhelper-4dc71f1553bb996cce45589c22f8330d341ed4bc.tar.gz |
dh_install: Fix --exclude of patterns
Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | dh_install | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 58ae064a..bb4f9c87 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@thykier.net> Sun, 12 Nov 2017 09:55:24 +0000 @@ -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); } |