Control: found -1 10.5.1
Control: tags -1 + patch

On 2017-07-09 23:13 +0300, Adrian Bunk wrote:

> Package: debhelper
> Version: 10.6.1
> Severity: serious
> Control: affects -1 src:freebsd-manpages
>
>  
> https://tests.reproducible-builds.org/debian/rb-pkg/unstable/arm64/freebsd-manpages.html
>
> ...
>    dh_compress
> ln: failed to create hard link 'usr/share/man/man9/m_freem.9freebsd.gz': File 
> exists

Not having a clue what could have caused this regression, I bisected the
problem and found commit f9999ffaa5 ("dh_installman: Split manpages
between processes") the culprit.  Attached is a patch that restores
previous behavior of dh_installman and makes freebsd-manpages build for
me. :-)

Cheers,
       Sven

>From fb12269009ee2bcd250dbe9b80c137ee1ac1941e Mon Sep 17 00:00:00 2001
From: Sven Joachim <svenj...@gmx.de>
Date: Mon, 10 Jul 2017 09:33:34 +0200
Subject: [PATCH] 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.
---
 dh_installman | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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

Reply via email to