[debhelper-devel] [debhelper] 01/01: dh_gencontrol: Deduplicate debug ids

Niels Thykier nthykier at moszumanska.debian.org
Tue Jan 2 09:02:46 UTC 2018


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

nthykier pushed a commit to branch master
in repository debhelper.

commit 6d5f3b79c743ee8b466813ea3e62b4d492fc598c
Author: Niels Thykier <niels at thykier.net>
Date:   Tue Jan 2 09:01:06 2018 +0000

    dh_gencontrol: Deduplicate debug ids
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog | 3 +++
 dh_gencontrol    | 8 +++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 418bef4..b0448c2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -50,6 +50,9 @@ debhelper (11.1) UNRELEASED; urgency=medium
   * dh_strip: Do not strip debug symbols in ".../debug/.build-id/".
     Thanks to Mattia Rizzolo for reporting the bug.
     (Closes: #886037)
+  * dh_gencontrol: Deduplicate debug-ids before inserting them into
+    the control file.  Thanks to Mattia Rizzolo for reporting the
+    bug.  (Closes: #886038)
 
  -- Niels Thykier <niels at thykier.net>  Sun, 17 Dec 2017 07:59:18 +0000
 
diff --git a/dh_gencontrol b/dh_gencontrol
index 524b581..2289168 100755
--- a/dh_gencontrol
+++ b/dh_gencontrol
@@ -194,7 +194,13 @@ sub read_dbgsym_migration {
 }
 
 sub read_dbgsym_build_ids {
-	return read_dbgsym_file('dbgsym-build-ids', @_);
+	my $res = read_dbgsym_file('dbgsym-build-ids', @_);
+	my (%seen, @unique);
+	for my $id (split(' ', $res)) {
+		next if $seen{$id}++;
+		push(@unique, $id);
+	}
+	return join(' ', @unique);
 }
 
 =head1 SEE ALSO

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