[debhelper-devel] [debhelper] 01/01: dh_compress: Correctly handle -P/abs/dir

Niels Thykier nthykier at moszumanska.debian.org
Sun Mar 13 07:29:13 UTC 2016


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit f29fc94894e9ce483b969878e9e48d547517d77f
Author: Niels Thykier <niels at thykier.net>
Date:   Sun Mar 13 07:28:42 2016 +0000

    dh_compress: Correctly handle -P/abs/dir
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog | 3 +++
 dh_compress      | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 784e4c0..78366f9 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 at thykier.net>  Thu, 10 Mar 2016 03:32:41 +0000
 
diff --git a/dh_compress b/dh_compress
index 7cac14c..fe3d6cb 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;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list