[debhelper-devel] [debhelper] 01/01: dh_install: Fix --exclude on entire patterns
Niels Thykier
nthykier at moszumanska.debian.org
Sat Nov 4 11:49:28 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 874410ef1389fe2a62c9361c75915c8541828b93
Author: Niels Thykier <niels at thykier.net>
Date: Sat Nov 4 11:48:20 2017 +0000
dh_install: Fix --exclude on entire patterns
Signed-off-by: Niels Thykier <niels at thykier.net>
---
debian/changelog | 3 +++
dh_install | 8 +++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index e5608cc..56b8d9c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,9 @@ debhelper (10.10.6) UNRELEASED; urgency=medium
* dh_installsystemd,dh_systemd_start: Use "restart" instead of the
"try-restart" action. This ensures that newly added services are
started the first time they are installed. (Closes: #879727)
+ * dh_install: Fix regression where it was no longer possible to
+ exclude an entire pattern / source file. Thanks to James Cowgill
+ for the report. (Closes: #814856)
-- Axel Beckert <abe at debian.org> Fri, 27 Oct 2017 23:48:44 +0200
diff --git a/dh_install b/dh_install
index 1d91bb0..69e275c 100755
--- a/dh_install
+++ b/dh_install
@@ -213,7 +213,12 @@ foreach my $package (getpackages()) {
if (@$set > 1) {
$dest=pop @$set;
}
- foreach my $glob (@$set) {
+ # Skip excluded patterns. We will need two exclude checks per pattern;
+ # 1) exclude the entire pattern as people expect this to work (#814856)
+ # 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) {
my @found = glob_expand(\@search_dirs, $glob_error_handler, $glob);
push(@filelist, map { tr{/}{/}s; $_ } @found);
}
@@ -225,6 +230,7 @@ foreach my $package (getpackages()) {
}
# Do a quick bulk handling of excluded files and update @installed.
+ # - this is for filtering files matched by the pattern
@filelist = grep { not excludefile($_) } @filelist if $exclude;
push(@installed, @filelist);
--
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