summaryrefslogtreecommitdiff
path: root/dh_installman
diff options
context:
space:
mode:
authorSven Joachim <svenjoac@gmx.de>2017-07-10 09:33:34 +0200
committerNiels Thykier <niels@thykier.net>2017-07-12 05:55:33 +0000
commitf792b4085c096987ebdf19a85d04c7b852e66798 (patch)
treef00fe26c9fde2689ecbc5b9e784f1e51128e349f /dh_installman
parente9bedc833d8249f0f3f2b97b3f91c92eda0a21db (diff)
downloaddebhelper-f792b4085c096987ebdf19a85d04c7b852e66798.tar.gz
dh_installman: Remove compressed manpages after reencoding
Since commit f9999ffaa5 dh_installman would inadvertently not remove compressed manpages after reencoding and thereby uncompressing them. This is not usually a problem since dh_compress takes care of it later, but if there are multiple hardlinks for the same file dh_compress fails in this situation. Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'dh_installman')
-rwxr-xr-xdh_installman3
1 files changed, 2 insertions, 1 deletions
diff --git a/dh_installman b/dh_installman
index afa8ffdd..1740a5d7 100755
--- a/dh_installman
+++ b/dh_installman
@@ -296,7 +296,8 @@ if (defined `man --version`) {
my $manpage_cmd = ($manpage =~ m{^/}) ? $manpage : "./${manpage}";
complex_doit "man --recode UTF-8 \Q${manpage_cmd}\E > \Q$manpage_tmp\E";
# recode uncompresses compressed pages
- rm_files($manpage) if $manpage =~ s/\.(gz|Z)$//;
+ my $orig = $manpage;
+ rm_files($orig) if $manpage =~ s/\.(gz|Z)$//;
rename_path($manpage_tmp, $manpage);
}
# Bulk reset permissions of all re-encoded files