From f94b4b1aea929a8af7d093a118a570f8739b9574 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 30 Jun 2009 12:48:28 -0400 Subject: dh_install: Handle correctly the case where a glob expands to a dangling symlink, installing the dangling link as requested. Closes: #534565 --- dh_install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dh_install') diff --git a/dh_install b/dh_install index c83ec81b..3d9a562d 100755 --- a/dh_install +++ b/dh_install @@ -147,7 +147,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { my @found = glob "$srcdir/$glob"; if (! compat(6)) { # Fall back to looking in debian/tmp. - if (! @found || ! -e $found[0]) { + if (! @found || ! (-e $found[0] || -l $found[0])) { @found = glob "debian/tmp/$glob"; } } -- cgit v1.2.3 From e45749314e98a3304b1f845884ac50327c29cc10 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 30 Jun 2009 12:56:42 -0400 Subject: 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.) --- dh_install | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'dh_install') diff --git a/dh_install b/dh_install index 3d9a562d..1ea2c708 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; } -- cgit v1.2.3