From 93291250c65cbc27a51cbd999109040611df4518 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 13 Nov 2012 12:42:51 +0000 Subject: [PATCH] avoid duplicates in source BINARIES element when multiple versions of a package (e.g. Architecture: all) are present --- britney.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/britney.py b/britney.py index 793c7dc..316d318 100755 --- a/britney.py +++ b/britney.py @@ -562,7 +562,9 @@ class Britney(object): # if the source package is available in the distribution, then register this binary package if dpkg[SOURCE] in sources[distribution]: - sources[distribution][dpkg[SOURCE]][BINARIES].append(pkg + "/" + arch) + pkg_arch = pkg + "/" + arch + if pkg_arch not in sources[distribution][dpkg[SOURCE]][BINARIES]: + sources[distribution][dpkg[SOURCE]][BINARIES].append(pkg_arch) # if the source package doesn't exist, create a fake one else: sources[distribution][dpkg[SOURCE]] = [dpkg[SOURCEVER], 'faux', [pkg + "/" + arch], None, True]