[debhelper-devel] Bug#829142: debhelper: dh_strip triggers fatal lintian error for packages with multiple hardlinks

Sven Joachim svenjoac at gmx.de
Fri Jul 1 09:14:35 UTC 2016


On 2016-07-01 00:05 +0200, Sven Joachim wrote:

> Package: debhelper
> Version: 9.20160618.1
> Severity: serious
>
> For packages which ship files with multiple hardlinks, dh_strip produces
> broken -dbgsym packages that trigger the
> library-in-debug-or-profile-should-not-be-stripped lintian error, which
> unfortunately leads to auto-rejection by the FTP masters and cannot be
> overridden.

The culprit is commit d98cb4705e ("dh_strip: Cache file(1) output").
Prior to this commit, dh_strip would detect that the file had already
been stripped, but now it strips it multiple times, producing unusable
debug info.

For packages which ship automatic debug symbols or use debhelper compat
level ≥ 9, the following patch works:

--8<---------------cut here---------------start------------->8---
diff --git a/dh_strip b/dh_strip
index 8d00e97..7d40c24 100755
--- a/dh_strip
+++ b/dh_strip
@@ -276,7 +276,8 @@ sub make_debug {
 	}
 	else {
 		# Compat 9 OR a dbgsym package.
-		doit($objcopy, "--only-keep-debug", "--compress-debug-sections", $file, $debug_path);
+		doit($objcopy, "--only-keep-debug", "--compress-debug-sections", $file, $debug_path)
+			unless -e $debug_path;
 	}
 
 	# No reason for this to be executable.
--8<---------------cut here---------------end--------------->8---

However, this does not help in the case of manual -dbg packages and
debhelper compat level ≤ 8, since $debug_path is then different for
different hardlinks to the same file.

Cheers,
       Sven




More information about the debhelper-devel mailing list