summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-07-14 17:08:23 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-07-14 17:08:23 -0400
commitf2bd791e8b07447e395e018331ff1f8c7757b4d6 (patch)
treeec63e6fcb11dd9b6128044155c406f3b0b1a9290
parent0cec46a017d11c8967a7ea5cb1082e9abfa6dc7b (diff)
dh_install: Fix support for the case where --sourcedir=debian/tmp/foo is used. Perl was not being greedy enough and the 'foo' was not stripped from the destination directory in this unusual case. Closes: #537017
-rw-r--r--debian/changelog8
-rwxr-xr-xdh_install3
2 files changed, 10 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 3ebf2f4a..fd780c8c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debhelper (7.2.22) UNRELEASED; urgency=low
+
+ * dh_install: Fix support for the case where --sourcedir=debian/tmp/foo
+ is used. Perl was not being greedy enough and the 'foo' was not stripped
+ from the destination directory in this unusual case. Closes: #537017
+
+ -- Joey Hess <joeyh@debian.org> Tue, 14 Jul 2009 17:05:26 -0400
+
debhelper (7.2.21) unstable; urgency=low
* Add a versioned dep on perl-base, to get a version that supports
diff --git a/dh_install b/dh_install
index 2a5a5911..eb196e5c 100755
--- a/dh_install
+++ b/dh_install
@@ -166,7 +166,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
if (! defined $dest) {
# Guess at destination directory.
$dest=$src;
- $dest=~s/^(.*\/)?(\Q$srcdir\E|debian\/tmp)\///;
+ $dest=~s/^(.*\/)?\Q$srcdir\E\/// ||
+ $dest=~s/^(.*\/)?debian\/tmp\///;
$dest=dirname("/".$dest);
$tmpdest=1;
}