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

On 2017-07-01 10:01 +0300, Adrian Bunk wrote:

> Source: debhelper
> Version: 10.6.1
> Severity: serious
> Control: affects -1 src:webalizer
>
> The new debhelper causes a FTBFS in webalizer:
>
> https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/webalizer.html
>
> ...
>   dh_compress
> dh_compress: symlink(webalizer.1.gz, 
> debian/webalizer/usr/share/man/man1/webazolver.1.gz) failed: File exists

Previous versions of debhelper had used "ln -sf" to create the symlink,
but since version 10.5.1 dh_compress uses perl's own symlink() function
and fails to remove the target beforehand.  The attached patch fixes
this for me.

Cheers,
       Sven


>From a159f5404b0a43bf66062cb3ac67ae4316a89dca Mon Sep 17 00:00:00 2001
From: Sven Joachim <svenj...@gmx.de>
Date: Sat, 1 Jul 2017 16:52:52 +0200
Subject: [PATCH] dh_compress: Remove target before creating fixup symlink

The target might already exist, possible because it had been created
by dh_link before.

Regression introduced by the switch to make_symlink_raw_target in
commit ee8fd59af61fa4739cdd536ecbb492cc8520df40.
---
 dh_compress | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dh_compress b/dh_compress
index 89c23f8a..21503c6a 100755
--- a/dh_compress
+++ b/dh_compress
@@ -212,7 +212,7 @@ on_pkgs_in_parallel {
 				my ($directory) = $link =~ m:(.*)/:;
 				my $linkval = readlink($link);
 				if (! -e "$directory/$linkval" && -e "$directory/$linkval.gz") {
-					rm_files($link);
+					rm_files($link, "$link.gz");
 					make_symlink_raw_target("$linkval.gz","$link.gz");
 					delete $links{$link};
 					$changed++;
-- 
2.13.2

Reply via email to