summaryrefslogtreecommitdiff
path: root/dh_md5sums
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2016-12-26 22:35:08 +0000
committerNiels Thykier <niels@thykier.net>2016-12-26 22:35:08 +0000
commitcc93cec7c037c4d1137a874f66d039568a6f82d1 (patch)
treec60d2fce77ce9203023c3bb2e75da22b33425f99 /dh_md5sums
parenta105aa0f136487d22de4225499c6c25e833a603b (diff)
downloaddebhelper-cc93cec7c037c4d1137a874f66d039568a6f82d1.tar.gz
dh_md5sums: Massage md5sum to avoid GNU-specific escaping
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'dh_md5sums')
-rwxr-xr-xdh_md5sums6
1 files changed, 4 insertions, 2 deletions
diff --git a/dh_md5sums b/dh_md5sums
index b4b3c925..7e00c977 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");