Your message dated Fri, 14 Jul 2017 18:04:00 +0000
with message-id <e1dw4wa-000axi...@fasolo.debian.org>
and subject line Bug#867881: fixed in debhelper 10.6.4
has caused the Debian Bug report #867881,
regarding debhelper: dh_compress fails if there are multiple hardlinks and the 
targets exist
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
867881: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867881
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: debhelper
Version: 2.0.86
Severity: normal

It is no problem for dh_compress to compress a file foo even if foo.gz
already exists, thanks to gzip's -f option.  However, there is a
situation where it fails: if foo and bar are hardlinks to the same file,
and both foo.gz and bar.gz exist as in the attached source package, an
error occurs:

,----
| dh_compress
| ln: failed to create hard link 'usr/share/man/man1/foo.1.gz': File exists
| dh_compress: ln usr/share/man/man1/bar.1.gz usr/share/man/man1/foo.1.gz 
returned exit code 1
| dh_compress: Aborting due to earlier error
| debian/rules:7: recipe for target 'override_dh_compress' failed
| make[1]: *** [override_dh_compress] Error 25
| make[1]: Leaving directory '/tmp/foo'
| debian/rules:4: recipe for target 'binary' failed
| make: *** [binary] Error 2
| dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 
2
`----

This is the situation that happened in #867846, but it's not exactly a
new problem - I could reproduce it with debhelper 2.0.86 in a potato
chroot.  Probably it has been around "forever", debhelper 1.2.20 seems
to be the first version of dh_compress with working hardlink support,
but I could not get that to build.

The following patch makes sense to me, what do you think?

--8<---------------cut here---------------start------------->8---
diff --git a/dh_compress b/dh_compress
index b5b1fb36..a0000d08 100755
--- a/dh_compress
+++ b/dh_compress
@@ -196,7 +196,7 @@ on_pkgs_in_parallel {
                        # Remove old file.
                        rm_files($_);
                        # Make new hardlink.
-                       doit("ln","$hardlinks{$_}.gz","$_.gz");
+                       doit("ln","-f","$hardlinks{$_}.gz","$_.gz");
                }
 
                verbose_print("cd '$olddir'");
--8<---------------cut here---------------end--------------->8---


-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 4.12.0-nouveau (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages debhelper depends on:
ii  autotools-dev            20161112.1
ii  binutils                 2.28-6
ii  dh-autoreconf            14
ii  dh-strip-nondeterminism  0.035-2
ii  dpkg                     1.18.24
ii  dpkg-dev                 1.18.24
ii  file                     1:5.30-1
ii  libdpkg-perl             1.18.24
ii  man-db                   2.7.6.1-2
ii  perl                     5.24.1-7
ii  po-debconf               1.0.20

debhelper recommends no packages.

Versions of packages debhelper suggests:
ii  dh-make  2.201608

-- no debconf information

Attachment: foo_0.0.tar.xz
Description: test package


--- End Message ---
--- Begin Message ---
Source: debhelper
Source-Version: 10.6.4

We believe that the bug you reported is fixed in the latest version of
debhelper, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 867...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niels Thykier <ni...@thykier.net> (supplier of updated debhelper package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 14 Jul 2017 17:49:46 +0000
Source: debhelper
Binary: debhelper dh-systemd
Architecture: source
Version: 10.6.4
Distribution: unstable
Urgency: medium
Maintainer: Debhelper Maintainers <debhelper-de...@lists.alioth.debian.org>
Changed-By: Niels Thykier <ni...@thykier.net>
Description:
 debhelper  - helper programs for debian/rules
 dh-systemd - debhelper add-on to handle systemd unit files - transitional pack
Closes: 867846 867866 867881 868169 868204
Changes:
 debhelper (10.6.4) unstable; urgency=medium
 .
   * dh_installmenu: Revert "Stop installing menu files in compat 11
     (menu-methods are still installed)".
   * 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)
   * Dh_lib.pm: Rewrite reset_perm_and_owner to it does chmod + chown
     using perl built-ins rather than forking+exec.
   * dh_compress: Apply patch from Sven Joachim to make dh_compress
     gracefully handle hardlinks, where the target files already
     exists.  (Closes: #867881)
   * dh_install: Re-instate bug compatibility with debhelper (<< 10.6)
     where (some) path arguments where split on space as if it had
     been parsed in the config file.  (Closes: #867866)
   * dh_installdocs: Ditto.
   * dh_installexamples: Ditto.
   * dh_installinfo: Ditto.
   * dh_installman: Ditto.
   * Dh_Lib.pm: Fix a regression in handling of dangling symlinks for
     native file copying that caused dh_installdocs to no longer replace
     dangling symlinks with real files.  Thanks to Stéphane Glondu
     for the report.  (Closes: #868204)
   * dh_install: Silently disable bulk optimization when two source paths
     have the same destination.  Thanks to Gianfranco Costamagna for
     reporting the regression.  (Closes: #868169)
   * d/control: Set Testsuite to autopkgtest-pkg-perl to enable
     autopkgtests.
Checksums-Sha1:
 9acb859461d669fb369f493b2521c057ab8e50fc 1765 debhelper_10.6.4.dsc
 aa7a5dca2d75232ffc574b5f24b736f989f8a9c3 412768 debhelper_10.6.4.tar.xz
 a0868bfcc659828e336fe3c70036c0fd031f4745 4466 debhelper_10.6.4_source.buildinfo
Checksums-Sha256:
 c579932adcbd7e2d9fc1f402b262e57eda7e033c5dade09d2bb53d1011336eae 1765 
debhelper_10.6.4.dsc
 aa11ea77ce605f38318eb3265bdea81ce7113e6fff66c8bd15fc542b64583761 412768 
debhelper_10.6.4.tar.xz
 db92727f864985527dfc7cdf638267f824af28fe296b5da2d52117e741c25e46 4466 
debhelper_10.6.4_source.buildinfo
Files:
 b9f0066b3a3ae6e4297d6c5c91e1f56b 1765 devel optional debhelper_10.6.4.dsc
 b96a1f816aad693df5a376191afcc48c 412768 devel optional debhelper_10.6.4.tar.xz
 bee1e3ccb986c148f6c98b2697f5c681 4466 devel optional 
debhelper_10.6.4_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEsxMaRR2/33ygW0GXBUu7n32AZEIFAllpBNAACgkQBUu7n32A
ZEIjhQ//YEStIQYPCtYqyvbPg8B+tU5mMdT5cUoO4CuIOgT4ePMVLWitS9sKbI/E
LIMrUXIG8Rb9bv9kH55Ru+nWPqMwwQR+y6yGBWeqEKXFT7qUXnJ85ZGmrAtLsNsx
r7rgY2bweTVCPgkVxqQ82flUwF9z9q+LTEpdxDV6EdaTiG4sTq7J4WSNl48FcG7B
buzKRxRPsSEK+sk2lzt1hMx1//7zEVpI+FTRhroHTE4qRTPUAuaqPin19MUjC7Hu
3DMcb6RCrgXjXdQs/TZ3JvRmjZgg3fM09a6T7R02SkTHiCLpnvoccgPaPgRoOmoV
N7bRC9mYhx76wo4RURkqwzfV4IEgs6bMcvsTv6/mJU90maAPM73FrXw1c9+6M94A
/dIzr6dhswriDIWRm5XjH2aLjf6OAYtSD5hngg2LVlMQckgnBb4csfLkpdhAaf6c
1qmYFDbGIi0P/2L0MxoUnRCXrAER66IUJNNZPXH4hKL4tbOk1cH5ZcrI42LN1+L0
exZNnYQ/OwVtHohuD/XtXtg4F2o3CiYaDBIW0CiTVbY6d7ESmZzThmNki/60YQ1+
cq8oy6SQQsAGF1XQpNS9GpZiNQn7MFfvCKmK4EktzZgKJtsN8tPNHEBhpTiXKlYM
0dkVTHdePamRDdaaLTEJIkj150TgeIXbsgq6Em6Bh8vDAWCiJ9M=
=+wCP
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to