summaryrefslogtreecommitdiff
path: root/dh_md5sums
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2015-06-06 13:40:26 +0200
committerNiels Thykier <niels@thykier.net>2015-06-06 13:40:26 +0200
commit344e77ce5963d1abdba6c729af8a3ab62e8d33e8 (patch)
treefffcc037f3c66a40759a37b54f4d79db183e13f2 /dh_md5sums
parentee57d7a0c7a6950f3dc481f88682e8172cb70bc9 (diff)
downloaddebhelper-344e77ce5963d1abdba6c729af8a3ab62e8d33e8.tar.gz
dh_md5sums: create DEBIAN dir in ddebs before using it
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'dh_md5sums')
-rwxr-xr-xdh_md5sums4
1 files changed, 4 insertions, 0 deletions
diff --git a/dh_md5sums b/dh_md5sums
index 521fa66b..e2bc7245 100755
--- a/dh_md5sums
+++ b/dh_md5sums
@@ -87,6 +87,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
doit("chown", "0:0", "$tmp/DEBIAN/md5sums");
}
if ( -d $ddeb_tmp) {
+ if (! -d "${ddeb_tmp}/DEBIAN") {
+ install_dir("${ddeb_tmp}/DEBIAN");
+ }
+
$find = "find . -type f ! -regex './DEBIAN/.*' -printf '%P\\0'";
complex_doit("(cd $ddeb_tmp >/dev/null ; $find | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums) >/dev/null");
# If the file's empty, no reason to waste inodes on it.