[debhelper-devel] [debhelper] 03/28: Do not create ddebs if its name would clash with another pkg

Niels Thykier nthykier at moszumanska.debian.org
Sun Jun 28 12:57:15 UTC 2015


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

nthykier pushed a commit to branch master
in repository debhelper.

commit 8498f6714fe2440af5da0cf4561dda31393f18d0
Author: Niels Thykier <niels at thykier.net>
Date:   Thu May 14 11:15:16 2015 +0200

    Do not create ddebs if its name would clash with another pkg
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 dh_strip | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/dh_strip b/dh_strip
index 769f1c3..8149a86 100755
--- a/dh_strip
+++ b/dh_strip
@@ -193,6 +193,8 @@ sub attach_debug {
 	doit($objcopy, "--add-gnu-debuglink", $debug_path, $file);
 }
 
+my %all_packages = map { $_ => 1 } getpackages();
+
 foreach my $package (@{$dh{DOPACKAGES}}) {
 	my $tmp=tmpdir($package);
 
@@ -206,7 +208,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 			# Note that it's only an array for the v4 stuff;
 			# for v5 only one value is used.
 			my $debugpackage=@{$dh{DEBUGPACKAGES}}[0];
-			if (! grep { $_ eq $debugpackage } getpackages()) {
+			if (!$all_packages{$debugpackage}) {
 				error("debug package $debugpackage is not listed in the control file");
 			}
 			$debugtmp=tmpdir($debugpackage);
@@ -219,9 +221,12 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 		}
 	}
 	if ($ENV{'DH_BUILD_DDEBS'} and not $keep_debug and package_arch($package) ne 'all') {
-		$debugtmp = "debian/.debhelper/${package}/ddeb-root";
-		$keep_debug = 1;
-		$use_build_id = 2;
+		# Avoid creating a ddeb that would clash with a registered package
+		if (!$all_packages{"${package}-dbgsym"}) {
+			$debugtmp = "debian/.debhelper/${package}/ddeb-root";
+			$keep_debug = 1;
+			$use_build_id = 2;
+		}
 	}
 	@shared_libs=@executables=@static_libs=();
 	find(\&testfile,$tmp);

-- 
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