[debhelper-devel] [debhelper] 01/03: dh_install: Push some code out of a loop
Niels Thykier
nthykier at moszumanska.debian.org
Mon Jun 26 13:17:51 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 62cf057d60b8156159342bead49a7df13f56030e
Author: Niels Thykier <niels at thykier.net>
Date: Mon Jun 26 12:26:44 2017 +0000
dh_install: Push some code out of a loop
Signed-off-by: Niels Thykier <niels at thykier.net>
---
dh_install | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/dh_install b/dh_install
index df60f49..4771233 100755
--- a/dh_install
+++ b/dh_install
@@ -219,11 +219,14 @@ foreach my $package (getpackages()) {
next;
}
- foreach my $src (@filelist) {
- next if excludefile($src);
-
- push @installed, $src;
- next if $skip_install or $missing_files;
+ # Do a quick bulk handling of excluded files and update @installed.
+ @filelist = grep { not excludefile($_) } @filelist if $exclude;
+ push(@installed, @filelist);
+
+ # ... because then we can short-curcit here.
+ next if $skip_install or $missing_files;
+
+ foreach my $src (@filelist) {
if (! defined $dest) {
# Guess at destination directory.
--
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