init();
foreach my $package (@{$dh{DOPACKAGES}}) {
+ next if is_udeb($package);
+
my $tmp=tmpdir($package);
if (! -d "$tmp/DEBIAN") {
while (<CONFF>) {
chomp;
s/^\///;
- $exclude.="! -path \"$_\" ";
+ $exclude.="! -path \"./$_\" ";
}
close CONFF;
}
$exclude.="! \\( $dh{EXCLUDE_FIND} \\) ";
}
- my $olddir=getcwd();
- complex_doit("cd $tmp >/dev/null ; find . -type f $exclude ! -regex '.*/DEBIAN/.*' -printf '%P\\0' | xargs -r0 md5sum > DEBIAN/md5sums ; cd '$olddir' >/dev/null");
+ complex_doit("(cd $tmp >/dev/null ; find . -type f $exclude ! -regex '.*/DEBIAN/.*' -printf '%P\\0' | xargs -r0 md5sum > 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");