From 5e3a245759e1c8f2bff9072ce2aced2a5c626f12 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Thu, 23 Dec 2010 20:54:14 +0000 Subject: [PATCH] Properly remove failed tpu binNMUs from the result set Signed-off-by: Adam D. Barratt When undoing the addition to the result set of a binNMU from tpu, the package name from the hint will end in ${arch}_tpu, not ${arch}, so we should check for both cases. At the same time, reverse the sense of the associated test to make the logic more obvious. --- britney.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/britney.py b/britney.py index 3c9d10c..17f2d83 100755 --- a/britney.py +++ b/britney.py @@ -2308,9 +2308,9 @@ class Britney: if pkg[0] != '-' and pkg_name in sources[suite]: for p in sources[suite][pkg_name][BINARIES]: binary, arch = p.split("/") - if "/" in pkg and arch != pkg[pkg.find("/")+1:]: continue - del binaries[arch][0][binary] - self.systems[arch].remove_binary(binary) + if '/' not in pkg or pkg.endswith("/%s" % (arch)) or pkg.endswith("/%s_tpu" % (arch)): + del binaries[arch][0][binary] + self.systems[arch].remove_binary(binary) # undo the changes (binaries) for p in undo['binaries'].keys():