diff --git a/britney.py b/britney.py index c1c5f8f..b2b5bf2 100755 --- a/britney.py +++ b/britney.py @@ -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!") diff --git a/britney2/hints.py b/britney2/hints.py index f46e1ef..47cc0ff 100644 --- a/britney2/hints.py +++ b/britney2/hints.py @@ -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',