summaryrefslogtreecommitdiff
path: root/dh_install
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-06-30 12:56:42 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-06-30 12:56:42 -0400
commite45749314e98a3304b1f845884ac50327c29cc10 (patch)
treef9751a933a3fabbdf08c5470995447a2f39403c0 /dh_install
parentf94b4b1aea929a8af7d093a118a570f8739b9574 (diff)
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)
(This also includes a fix to avoid doubled slashes in paths passed to commands.)
Diffstat (limited to 'dh_install')
-rwxr-xr-xdh_install8
1 files changed, 2 insertions, 6 deletions
diff --git a/dh_install b/dh_install
index 3d9a562..1ea2c70 100755
--- a/dh_install
+++ b/dh_install
@@ -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;
}