mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-13 23:38:20 +00:00
Defer loading and registering of hints
Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
e52d46a84d
commit
584f75bbc0
16
britney.py
16
britney.py
@ -292,11 +292,6 @@ class Britney(object):
|
||||
self.all_selected = []
|
||||
self.excuses = {}
|
||||
|
||||
try:
|
||||
self.read_hints(self.options.hintsdir)
|
||||
except AttributeError:
|
||||
self.read_hints(os.path.join(self.suite_info['unstable'].path, 'Hints'))
|
||||
|
||||
if self.options.nuninst_cache:
|
||||
self.logger.info("Not building the list of non-installable packages, as requested")
|
||||
if self.options.print_uninst:
|
||||
@ -371,6 +366,14 @@ class Britney(object):
|
||||
# nuninst_orig may get updated during the upgrade process
|
||||
self.nuninst_orig_save = clone_nuninst(self.nuninst_orig, architectures=self.options.architectures)
|
||||
|
||||
for policy in self.policies:
|
||||
policy.register_hints(self._hint_parser)
|
||||
|
||||
try:
|
||||
self.read_hints(self.options.hintsdir)
|
||||
except AttributeError:
|
||||
self.read_hints(os.path.join(self.suite_info['unstable'].path, 'Hints'))
|
||||
|
||||
for policy in self.policies:
|
||||
policy.hints = self.hints
|
||||
policy.initialise(self)
|
||||
@ -496,9 +499,6 @@ class Britney(object):
|
||||
self.policies.append(AgePolicy(self.options, self.suite_info, MINDAYS))
|
||||
self.policies.append(BuildDependsPolicy(self.options, self.suite_info))
|
||||
|
||||
for policy in self.policies:
|
||||
policy.register_hints(self._hint_parser)
|
||||
|
||||
@property
|
||||
def hints(self):
|
||||
return self._hint_parser.hints
|
||||
|
Loading…
x
Reference in New Issue
Block a user