summaryrefslogtreecommitdiff
path: root/dh_install
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2017-11-14 21:50:30 +0000
committerNiels Thykier <niels@thykier.net>2017-11-14 21:50:30 +0000
commit4dc71f1553bb996cce45589c22f8330d341ed4bc (patch)
tree48f9b6f35e1c96d39fc731730862c44e675fa6f2 /dh_install
parent9a1d01d48be3b23ae7371a6aa8fe0a7a0125460e (diff)
downloaddebhelper-4dc71f1553bb996cce45589c22f8330d341ed4bc.tar.gz
dh_install: Fix --exclude of patterns
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'dh_install')
-rwxr-xr-xdh_install6
1 files changed, 4 insertions, 2 deletions
diff --git a/dh_install b/dh_install
index 55eefe4d..05bcf761 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);
}