]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_md5sums
Fix build system auto-selection breakage.
[debhelper.git] / dh_md5sums
index 0619a3bae2337063f5bce1df6942d8c7a6782bb1..da00090b479aef4903371d872b7917ea6c42cf22 100755 (executable)
@@ -43,7 +43,10 @@ being listed in the md5sums file.
 
 =cut
 
-init();
+init(options => {
+       "x" => \$dh{INCLUDE_CONFFILES}, # is -x for some unknown historical reason..
+       "include-conffiles" => \$dh{INCLUDE_CONFFILES},
+});
 
 foreach my $package (@{$dh{DOPACKAGES}}) {
        next if is_udeb($package);
@@ -62,7 +65,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                while (<CONFF>) {
                        chomp;
                        s/^\///;
-                       $exclude.="! -path \"$_\" ";
+                       $exclude.="! -path \"./$_\" ";
                }
                close CONFF;
        }
@@ -72,8 +75,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                $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");