]> git.donarmstrong.com Git - debhelper.git/commitdiff
dh_install: Fix use of debian/tmp in v7 mode; a bug caused it to put files inside...
authorJoey Hess <joey@gnu.kitenet.net>
Tue, 30 Jun 2009 16:56:42 +0000 (12:56 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Tue, 30 Jun 2009 16:56:42 +0000 (12:56 -0400)
(This also includes a fix to avoid doubled slashes in paths passed to
commands.)

debian/changelog
dh_install

index 85cdfe8970be78302094ab8ab59526545edad4be..80872c60214f56c1328b324d76d3e7f234669b2d 100644 (file)
@@ -3,6 +3,9 @@ debhelper (7.2.19) UNRELEASED; urgency=low
   * dh_install: Handle correctly the case where a glob expands to
     a dangling symlink, installing the dangling link as requested.
     Closes: #534565
+  * dh_install: Fix use of debian/tmp in v7 mode; a bug caused it to
+    put files inside a debian/tmp directory in the package build directory,
+    now that prefix is stripped. (See #534565)
 
  -- Joey Hess <joeyh@debian.org>  Tue, 30 Jun 2009 12:46:22 -0400
 
index 3d9a562d8a49db9a6ed6bb938dd0bebe27d072fb..1ea2c70880675841761e3463d5e5dfa581083b85 100755 (executable)
@@ -113,7 +113,7 @@ init(options => {
 my @installed;
 
 my $srcdir = '.';
-$srcdir = $dh{SOURCEDIR}."/" if defined $dh{SOURCEDIR};
+$srcdir = $dh{SOURCEDIR} if defined $dh{SOURCEDIR};
 
 foreach my $package (@{$dh{DOPACKAGES}}) {
        my $tmp=tmpdir($package);
@@ -166,11 +166,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        if (! defined $dest) {
                                # Guess at destination directory.
                                $dest=$src;
-                               my $strip=$srcdir;
-                               if ($strip eq '.') {
-                                       $strip = "debian/tmp";
-                               }
-                               $dest=~s/^(.*\/)?\Q$strip\E//;
+                               $dest=~s/^(.*\/)?(\Q$srcdir\E|debian\/tmp)\///;
                                $dest=dirname($dest);
                                $tmpdest=1;
                        }