Ensure get_auto_hinter_hints does not choke on cruft items

Signed-off-by: Niels Thykier <niels@thykier.net>
ubuntu/rebased
Niels Thykier 6 years ago
parent 16f823dd91
commit 32ebe9d4e0
No known key found for this signature in database
GPG Key ID: A65B78DBE67C7AAC

@ -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)

@ -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

Loading…
Cancel
Save