From 8ac55c436c54c4acb91d729aa8a56f1aafe5250a Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sun, 29 Apr 2018 10:12:21 +0000 Subject: [PATCH] Avoid duplicate pkgs names in ood excuse Signed-off-by: Niels Thykier --- britney.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/britney.py b/britney.py index 3bbc20f..515299d 100755 --- a/britney.py +++ b/britney.py @@ -1449,6 +1449,8 @@ class Britney(object): if arch == 'all': consider_binaries = source_u.binaries else: + # Will also include arch:all for the given architecture (they are filtered out + # below) consider_binaries = sorted(x for x in source_u.binaries if x.architecture == arch) for pkg_id in consider_binaries: pkg = pkg_id.package_name @@ -1466,8 +1468,8 @@ class Britney(object): # up-to-date, there is a build on this arch if source_u.version != pkgsv: if pkgsv not in oodbins: - oodbins[pkgsv] = [] - oodbins[pkgsv].append(pkg) + oodbins[pkgsv] = set() + oodbins[pkgsv].add(pkg) excuse.add_old_binary(pkg, pkgsv) continue else: @@ -1478,7 +1480,7 @@ class Britney(object): # in the `outofsync_arches' list, then do not block the update if oodbins: oodtxt = "" - for v in oodbins.keys(): + for v in oodbins: if oodtxt: oodtxt = oodtxt + "; " oodtxt = oodtxt + "%s (from %s)" % \