summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2016-03-13 07:28:42 +0000
committerNiels Thykier <niels@thykier.net>2016-03-13 07:28:42 +0000
commitf29fc94894e9ce483b969878e9e48d547517d77f (patch)
treee86164251e0a2fb6f403a25a2b402c965fe8bd89
parentcf998895db65d990f878a0183d17df6dac96210a (diff)
downloaddebhelper-f29fc94894e9ce483b969878e9e48d547517d77f.tar.gz
dh_compress: Correctly handle -P/abs/dir
Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r--debian/changelog3
-rwxr-xr-xdh_compress6
2 files changed, 8 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 784e4c06..78366f98 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ debhelper (9.20160306+unreleased) UNRELEASED; urgency=medium
* Remove dh_undocumented.
* dh_install: Attempt to improve the documentation of the
config file "debian/not-installed".
+ * dh_compress: Gracefully handle absolute paths passed via
+ the -P option. Thanks to Andreas Beckmann for reporting
+ the issue. (Closes: #818049)
-- Niels Thykier <niels@thykier.net> Thu, 10 Mar 2016 03:32:41 +0000
diff --git a/dh_compress b/dh_compress
index 7cac14c3..fe3d6cbe 100755
--- a/dh_compress
+++ b/dh_compress
@@ -175,7 +175,11 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
# normalize file names and remove duplicates
- my @normalized = normalize_paths("${olddir}/${tmp}", $tmp, @f);
+ my $norm_from_dir = $tmp;
+ if ($norm_from_dir !~ m{^/}) {
+ $norm_from_dir = "${olddir}/${tmp}";
+ }
+ my @normalized = normalize_paths($norm_from_dir, $tmp, @f);
my %uniq_f; @uniq_f{@normalized} = ();
@f = sort keys %uniq_f;