From d688c9753b70e8f23c3b649c887e9abb686af599 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Mon, 17 Dec 2018 21:34:50 +0000 Subject: [PATCH] Split a loop to make the special-case more obvious Signed-off-by: Niels Thykier --- britney.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/britney.py b/britney.py index 28b8af2..a9328cc 100755 --- a/britney.py +++ b/britney.py @@ -1573,19 +1573,18 @@ class Britney(object): self.options.smooth_updates) # remove all the binaries which aren't being smooth updated - for pkg_id in (pkg_id for pkg_id in bins if pkg_id not in smoothbins): - binary, _, parch = pkg_id + if item.architecture != 'source' and source_suite.suite_class.is_additional_source: + # Special-case for pu/tpu: # if this is a binary migration from *pu, only the arch:any # packages will be present. ideally dak would also populate # the arch-indep packages, but as that's not the case we # must keep them around; they will not be re-added by the # migration so will end up missing from testing - if item.architecture != 'source' and \ - source_suite.suite_class.is_additional_source and \ - binaries_t[parch][binary].architecture == 'all': - continue - else: - rms.add(pkg_id) + all_binaries = self.all_binaries + rms = {pkg_id for pkg_id in bins + if pkg_id not in smoothbins and all_binaries[pkg_id].architecture != 'all'} + else: + rms = {pkg_id for pkg_id in bins if pkg_id not in smoothbins} # single binary removal; used for clearing up after smooth # updates but not supported as a manual hint