diff --git a/britney.py b/britney.py index dd582fa..24e7ac7 100755 --- a/britney.py +++ b/britney.py @@ -1967,7 +1967,8 @@ class Britney(object): # consider only excuses which are valid candidates and still relevant. valid_excuses = frozenset(y.uvname for y in upgrade_me - if y not in sources_t or sources_t[y].version != excuses[y].ver[1]) + if not y.is_cruft_removal and + (y not in sources_t or sources_t[y].version != excuses[y].ver[1])) excuses_deps = {name: valid_excuses.intersection(excuse.get_deps()) for name, excuse in excuses.items() if name in valid_excuses} excuses_rdeps = defaultdict(set) diff --git a/britney2/migrationitem.py b/britney2/migrationitem.py index 4c99cce..f868d49 100644 --- a/britney2/migrationitem.py +++ b/britney2/migrationitem.py @@ -19,12 +19,13 @@ from britney2 import SuiteClass class MigrationItem(object): - def __init__(self, package=None, version=None, architecture=None, uvname=None, suite=None): + def __init__(self, package=None, version=None, architecture=None, uvname=None, suite=None, is_cruft_removal=False): self._uvname = uvname self._package = package self._version = version self._architecture = architecture self._suite = suite + self._is_cruft_removal = is_cruft_removal if version is not None: self._name = "%s/%s" % (uvname, version) else: @@ -80,6 +81,10 @@ class MigrationItem(object): def uvname(self): return self._uvname + @property + def is_cruft_removal(self): + return self._is_cruft_removal + class MigrationItemFactory(object): @@ -95,7 +100,8 @@ class MigrationItemFactory(object): version=pkg_id.version, architecture=pkg_id.architecture, uvname=uvname, - suite=self._suites.target_suite + suite=self._suites.target_suite, + is_cruft_removal=True, ) @staticmethod