From 053f6f8b4e7431d32511aef209188a084e8c7e79 Mon Sep 17 00:00:00 2001 From: joey Date: Fri, 9 Feb 2001 00:57:53 +0000 Subject: r420: big monsta changes --- dh_md5sums | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'dh_md5sums') diff --git a/dh_md5sums b/dh_md5sums index d69186c8..ad3ae712 100755 --- a/dh_md5sums +++ b/dh_md5sums @@ -3,22 +3,23 @@ # Generate a DEBIAN/md5sums file, that lists the md5sums of all files in the # package. +use strict; use Cwd; use Debian::Debhelper::Dh_Lib; init(); -foreach $PACKAGE (@{$dh{DOPACKAGES}}) { - $TMP=tmpdir($PACKAGE); +foreach my $package (@{$dh{DOPACKAGES}}) { + my $tmp=tmpdir($package); - if (! -d "$TMP/DEBIAN") { - doit("install","-d","$TMP/DEBIAN"); + if (! -d "$tmp/DEBIAN") { + doit("install","-d","$tmp/DEBIAN"); } # Check if we should exclude conffiles. my $exclude=""; - if (! $dh{INCLUDE} && -r "$TMP/DEBIAN/conffiles") { + if (! $dh{INCLUDE} && -r "$tmp/DEBIAN/conffiles") { # Generate exclude regexp. - open (CONFF,"$TMP/DEBIAN/conffiles"); + open (CONFF,"$tmp/DEBIAN/conffiles"); while () { chomp; s/^\///; @@ -32,14 +33,14 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { $exclude.="! \\( $dh{EXCLUDE_FIND} \\) "; } - $olddir=getcwd(); - complex_doit("cd $TMP >/dev/null ; find * -type f $exclude ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums ; cd $olddir >/dev/null"); + my $olddir=getcwd(); + complex_doit("cd $tmp >/dev/null ; find * -type f $exclude ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums ; cd $olddir >/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"); + if (-z "$tmp/DEBIAN/md5sums") { + doit("rm","-f","$tmp/DEBIAN/md5sums"); } else { - doit("chmod",644,"$TMP/DEBIAN/md5sums"); - doit("chown","0.0","$TMP/DEBIAN/md5sums"); + doit("chmod",644,"$tmp/DEBIAN/md5sums"); + doit("chown","0.0","$tmp/DEBIAN/md5sums"); } } -- cgit v1.2.3