mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-10 22:17:36 +00:00
Try to remove old libs during hint run
Attempt the removal of the old libraries from smooth updates during every hint run. In some cases, the removal needs to happen during the hint run for the hint to succeed. Signed-off-by: Ivo De Decker <ivodd@debian.org>
This commit is contained in:
parent
70d461ff11
commit
4dc2cf7172
14
britney.py
14
britney.py
@ -1888,7 +1888,7 @@ class Britney(object):
|
||||
|
||||
return (is_accepted, nuninst_after, arch)
|
||||
|
||||
def iter_packages(self, packages, selected, nuninst=None, parent_transaction=None):
|
||||
def iter_packages(self, packages, selected, nuninst=None, parent_transaction=None, try_removals=True):
|
||||
"""Iter on the list of actions and apply them one-by-one
|
||||
|
||||
This method applies the changes from `packages` to testing, checking the uninstallability
|
||||
@ -1989,6 +1989,18 @@ class Britney(object):
|
||||
else:
|
||||
maybe_rescheduled_packages.append(comp[0])
|
||||
|
||||
if try_removals and self.options.smooth_updates:
|
||||
self.logger.info("> Removing old packages left in the target suite from smooth updates")
|
||||
removals = old_libraries(self.suite_info, self.options.outofsync_arches)
|
||||
if removals:
|
||||
output_logger.info("Removing packages left in the target suite for smooth updates (%d):", len(removals))
|
||||
log_and_format_old_libraries(self.output_logger, removals)
|
||||
(nuninst_last_accepted, extra) = self.iter_packages(removals,
|
||||
selected,
|
||||
nuninst=nuninst_last_accepted,
|
||||
parent_transaction=parent_transaction,
|
||||
try_removals=False)
|
||||
|
||||
output_logger.info(" finish: [%s]", ",".join(x.uvname for x in selected))
|
||||
output_logger.info("endloop: %s", self.eval_nuninst(self.nuninst_orig))
|
||||
output_logger.info(" now: %s", self.eval_nuninst(nuninst_last_accepted))
|
||||
|
Loading…
x
Reference in New Issue
Block a user