[debhelper-devel] [debhelper] 01/01: dh_md5sums: Massage md5sum to avoid GNU-specific escaping

Niels Thykier nthykier at moszumanska.debian.org
Mon Dec 26 22:35:56 UTC 2016


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit cc93cec7c037c4d1137a874f66d039568a6f82d1
Author: Niels Thykier <niels at thykier.net>
Date:   Mon Dec 26 22:35:08 2016 +0000

    dh_md5sums: Massage md5sum to avoid GNU-specific escaping
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog | 3 +++
 dh_md5sums       | 6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9edb8a0..1b0d68b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,9 @@ debhelper (10.2.3) UNRELEASED; urgency=medium
   * Bump dependency on dh-strip-nondeterminism to ensure
     stable-backports uses a functional version.  Thanks to Christoph
     Biedl for the report. (Closes: #843813)
+  * Massage md5sum output to avoid GNU-specific escaping extension
+    while we wait for dpkg-gendigests for a more compatible tool.
+    Thanks to Bernd Zeimetz for the report.  (Closes: #843163)
 
   [ Felipe Sateler ]
   * dh_systemd_start: Fix a bug where --restart-after-upgrade with
diff --git a/dh_md5sums b/dh_md5sums
index b4b3c92..7e00c97 100755
--- a/dh_md5sums
+++ b/dh_md5sums
@@ -77,7 +77,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 	}
 	
 	my $find="find . -type f $exclude ! -regex './DEBIAN/.*' -printf '%P\\0'";
-	complex_doit("(cd $tmp >/dev/null ; $find | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums) >/dev/null");
+	complex_doit("(cd $tmp >/dev/null ; $find | LC_ALL=C sort -z | xargs -r0 md5sum | " .
+                  q{perl -pe 'if (s@^\\\\@@) { s/\\\\\\\\/\\\\/g; }' > DEBIAN/md5sums) >/dev/null});
 	# If the file's empty, no reason to waste inodes on it.
 	if (-z "$tmp/DEBIAN/md5sums") {
 		doit("rm","-f","$tmp/DEBIAN/md5sums");
@@ -89,7 +90,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 		install_dir("${dbgsym_tmp}/DEBIAN");
 
 		$find = "find . -type f ! -regex './DEBIAN/.*' -printf '%P\\0'";
-		complex_doit("(cd $dbgsym_tmp >/dev/null ; $find | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums) >/dev/null");
+		complex_doit("(cd $dbgsym_tmp >/dev/null ; $find | LC_ALL=C sort -z | xargs -r0 md5sum | " .
+					 q{perl -pe 'if (s@^\\\\@@) { s/\\\\\\\\/\\\\/g; }' > DEBIAN/md5sums) >/dev/null});
 		# If the file's empty, no reason to waste inodes on it.
 		if (-z "${dbgsym_tmp}/DEBIAN/md5sums") {
 			doit('rm', '-f', "${dbgsym_tmp}/DEBIAN/md5sums");

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