From 3828a760531770f7c4486560e92e28c90ce0d050 Mon Sep 17 00:00:00 2001 From: Ivo De Decker Date: Tue, 11 Dec 2018 16:18:53 +0000 Subject: [PATCH] Filter out cruft in find_smooth_updateable_binaries When calculating smooth updateable binaries, filter out cruft binaries from unstable, because they will not be part of the set of packages that britney will try to migrate to testing. Signed-off-by: Ivo De Decker --- britney2/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/britney2/utils.py b/britney2/utils.py index 1b39e5b..a012ba5 100644 --- a/britney2/utils.py +++ b/britney2/utils.py @@ -961,11 +961,13 @@ def find_smooth_updateable_binaries(binaries_to_check, binary, _, parch = pkg_id cruft = False + cruftbins = set() # Not a candidate for smooth up date (newer non-cruft version in unstable) if binary in binaries_s[parch]: if binaries_s[parch][binary].source_version == source_data.version: continue + cruftbins.add(binaries_s[parch][binary].pkg_id) cruft = True # Maybe a candidate (cruft or removed binary): check if config allows us to smooth update it. @@ -987,7 +989,10 @@ def find_smooth_updateable_binaries(binaries_to_check, combined.add(pkg_id) for rdep in rdeps: for dep_clause in pkg_universe.dependencies_of(rdep): - if dep_clause <= combined: + # filter out cruft binaries from unstable, because + # they will not be added to the set of packages that + # will be migrated + if dep_clause - cruftbins <= combined: smooth_update_it = True break