[debhelper-devel] [debhelper] 01/04: dh_compress: Optimise the number of getcwd calls
Niels Thykier
nthykier at moszumanska.debian.org
Sat Oct 24 16:58:44 UTC 2015
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit 065440a227f8f85ebd18c985e55be6a7e00914cb
Author: Niels Thykier <niels at thykier.net>
Date: Tue Oct 20 08:41:11 2015 +0200
dh_compress: Optimise the number of getcwd calls
Signed-off-by: Niels Thykier <niels at thykier.net>
---
dh_compress | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dh_compress b/dh_compress
index a587454..e664f4b 100755
--- a/dh_compress
+++ b/dh_compress
@@ -77,6 +77,8 @@ Debian policy, version 3.0
init();
+my $olddir;
+
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
@@ -85,7 +87,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
# Run the file name gathering commands from within the directory
# structure that will be effected.
next unless -d $tmp;
- my $olddir=getcwd();
+ $olddir = getcwd() if not defined $olddir;
verbose_print("cd $tmp");
chdir($tmp) || error("Can't cd to $tmp: $!");
--
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