Browse Source

Add allow-uninst hint

Signed-off-by: Ivo De Decker <ivodd@debian.org>
devuan-deployment
Ivo De Decker 1 year ago
parent
commit
988b33d0ba
2 changed files with 12 additions and 1 deletions
  1. +10
    -0
      britney.py
  2. +2
    -1
      britney2/hints.py

+ 10
- 0
britney.py View File

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


+ 2
- 1
britney2/hints.py View File

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