summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog3
-rwxr-xr-xdh_installdocs2
-rwxr-xr-xdh_installman6
-rwxr-xr-xdh_strip2
4 files changed, 8 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog
index 40695377..ed9c44c1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,9 @@ debhelper (10.5.1) UNRELEASED; urgency=medium
* Dh_Lib: Avoid 1-2 stat calls in make_symlink by reusing existing
stat calls.
* dh_installman: Avoid a fork+exec for renaming a path.
+ * dh_installdocs: Avoid unnecssary stat call.
+ * dh_installman: Ditto.
+ * dh_strip: Ditto.
-- Niels Thykier <niels@thykier.net> Sun, 25 Jun 2017 18:02:30 +0000
diff --git a/dh_installdocs b/dh_installdocs
index 465a74d5..fd594ffc 100755
--- a/dh_installdocs
+++ b/dh_installdocs
@@ -241,7 +241,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
install_dir($target_dir) unless -l $target_dir;
foreach my $doc (@docs) {
next if excludefile($doc);
- next if -e $doc && ! -s $doc; # ignore empty files
+ next if -f $doc && ! -s _; # ignore empty files
ensure_docdir($package);
if (-d $doc && length $exclude) {
my $basename = basename($doc);
diff --git a/dh_installman b/dh_installman
index 49e58b99..899bd5a3 100755
--- a/dh_installman
+++ b/dh_installman
@@ -209,7 +209,7 @@ on_selected_pkgs_in_parallel(\@all_packages, sub {
my $instpage = "$destdir$instname.$section";
next if -l $instpage;
- next if compat(5) && -e $instpage;
+ next if compat(5) && -e _;
install_dir($destdir);
if ($gz) {
@@ -239,7 +239,7 @@ on_selected_pkgs_in_parallel(\@all_packages, sub {
next unless -e "$tmp/$dir";
my @files;
find(sub {
- return if !-f $_ || -l $_;
+ return if -l $_ || ! -f _;
my ($tmp, $orig) = ($_.".new", $_);
complex_doit "man --recode UTF-8 ./\Q$orig\E > \Q$tmp\E";
# recode uncompresses compressed pages
@@ -260,7 +260,7 @@ on_selected_pkgs_in_parallel(\@all_packages, sub {
sub find_so_man {
# The -s test is because a .so file tends to be small. We don't want
# to open every man page. 1024 is arbitrary.
- if (! -f $_ || -s $_ > 1024 || -s == 0) {
+ if (! -f $_ || -s _ > 1024 || -s _ == 0) {
return;
}
diff --git a/dh_strip b/dh_strip
index a7efc2d0..a05cf11a 100755
--- a/dh_strip
+++ b/dh_strip
@@ -366,7 +366,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
if ($use_build_id > 1 and -d $debugtmp) {
my $dbgsym_docdir = "${debugtmp}/usr/share/doc";
my $doc_symlink = "${dbgsym_docdir}/${package}-dbgsym";
- if ( not -l $doc_symlink and not -e $doc_symlink ) {
+ if ( not -l $doc_symlink and not -e _ ) {
install_dir($dbgsym_docdir);
make_symlink_raw_target($package, $doc_symlink);
}