]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_install
r1805: releasing version 5.0.0
[debhelper.git] / dh_install
index e43229a5cf20413838d71a151fe9681357238010..4bd584b54f7c3439ce8ef5fbd85681a01ca898b8 100755 (executable)
@@ -138,7 +138,12 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                if (! defined $dh{AUTODEST} && @$set > 1) {
                        $dest=pop @$set;
                }
-               # glob now, relative to srcdir
+               if (! compat(4)) { # check added in v5
+                       # glob now, relative to srcdir
+                       if (! map { glob "$srcdir/$_" } @$set) {
+                               error("$package missing files (@$set), aborting");
+                       }
+               }
                foreach my $src (map { glob "$srcdir/$_" } @$set) { 
                        next if excludefile($src);
                
@@ -198,14 +203,18 @@ if ($dh{LIST_MISSING} || $dh{FAIL_MISSING}) {
        
        my @missing;
        my $installed=join("|", @installed);
-       $installed=qr{^$installed$};
+       $installed=qr{^($installed)$};
        find(sub {
                -f || -l || return;
                $_="$File::Find::dir/$_";
-               push @missing, $_ unless /$installed/ || excludefile($_);
+               if (! /$installed/ && ! excludefile($_)) {
+                       my $file=$_;
+                       $file=~s/^\Q$srcdir\E\///;
+                       push @missing, $file;
+               }
        }, $srcdir);
        if (@missing) {
-               warning "$_ exists in debian/tmp but not installed to anywhere" foreach @missing;
+               warning "$_ exists in debian/tmp but is not installed to anywhere" foreach @missing;
                if ($dh{FAIL_MISSING}) {
                        error("missing files, aborting");
                }
@@ -225,7 +234,7 @@ contain:
 
 While debian/libfoo.install contains:
 
-  usr/libfoo*.so.*
+  usr/lib/libfoo*.so.*
 
 If you want a libfoo-dev package too, debian/libfoo-dev.install might contain: