[debhelper-devel] [debhelper] 01/01: dh_installman: Remove compressed manpages after reencoding

Niels Thykier nthykier at moszumanska.debian.org
Wed Jul 12 05:56:14 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 f792b4085c096987ebdf19a85d04c7b852e66798
Author: Sven Joachim <svenjoac at gmx.de>
Date:   Mon Jul 10 09:33:34 2017 +0200

    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 at thykier.net>
---
 debian/changelog | 4 ++++
 dh_installman    | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 9ff5c37..4480700 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,10 @@ debhelper (10.6.4) UNRELEASED; urgency=medium
   * dh: Revert "--without=build-stamp by default in compat 11".  Keep
     the compat 10 behaviour while enable packages to opt-in by
     explicitly passing --without=build-stamp themselves.
+  * dh_installman: Apply patch from Sven Joachim to fix regression,
+    where dh_installman would fail to remove the compressed manpage.
+    With hardlinks involved, this could make dh_compress fail later.
+    (Closes: #867846)
 
  -- Niels Thykier <niels at thykier.net>  Sun, 09 Jul 2017 12:30:20 +0000
 
diff --git a/dh_installman b/dh_installman
index afa8ffd..1740a5d 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

-- 
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