Add allow-uninst hint

Signed-off-by: Ivo De Decker <ivodd@debian.org>
ubuntu/rebased
Ivo De Decker 5 years ago
parent 4defca4cc1
commit 988b33d0ba

@ -324,6 +324,9 @@ class Britney(object):
target_suite = self.suite_info.target_suite
target_suite.inst_tester = self._inst_tester
self.allow_uninst = {}
for arch in self.options.architectures:
self.allow_uninst[arch] = set()
self._migration_item_factory = MigrationItemFactory(self.suite_info)
self._hint_parser = HintParser(self._migration_item_factory)
self._migration_manager = MigrationManager(self.options, self.suite_info, self.all_binaries, self.pkg_universe,
@ -737,6 +740,13 @@ class Britney(object):
z[package][architecture] = key
for hint in hints['allow-uninst']:
if hint.architecture == 'source':
for arch in self.options.architectures:
self.allow_uninst[arch].add(hint.package)
else:
self.allow_uninst[hint.architecture].add(hint.package)
# Sanity check the hints hash
if len(hints["block"]) == 0 and len(hints["block-udeb"]) == 0:
self.logger.warning("WARNING: No block hints at all, not even udeb ones!")

@ -50,7 +50,7 @@ class HintCollection(object):
class Hint(object):
NO_VERSION = [ 'block', 'block-all', 'block-udeb', 'allow-archall-maintainer-upload' ]
NO_VERSION = [ 'block', 'block-all', 'block-udeb', 'allow-archall-maintainer-upload', 'allow-uninst' ]
def __init__(self, user, hint_type, packages):
self._user = user
@ -168,6 +168,7 @@ class HintParser(object):
# Other
'remove': (1, split_into_one_hint_per_package),
'force': (1, split_into_one_hint_per_package),
'allow-uninst': (1, split_into_one_hint_per_package),
}
self._aliases = {
'approve': 'unblock',

Loading…
Cancel
Save