mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-23 00:11:32 +00:00
do_all(): Only collect lundo info if it will be used
Side-effect, "undo" can now be inferred from lundo (being not None), so it has been removed. Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
5d1ee6b57a
commit
352fd3da08
15
britney.py
15
britney.py
@ -2214,19 +2214,19 @@ class Britney(object):
|
|||||||
nuninst_start = self.nuninst_orig
|
nuninst_start = self.nuninst_orig
|
||||||
|
|
||||||
# these are special parameters for hints processing
|
# these are special parameters for hints processing
|
||||||
undo = False
|
|
||||||
force = False
|
force = False
|
||||||
earlyabort = False
|
earlyabort = False
|
||||||
|
lundo = None
|
||||||
|
nuninst_end = None
|
||||||
|
|
||||||
if hinttype == "easy" or hinttype == "force-hint":
|
if hinttype == "easy" or hinttype == "force-hint":
|
||||||
force = hinttype == "force-hint"
|
force = hinttype == "force-hint"
|
||||||
earlyabort = True
|
earlyabort = True
|
||||||
|
|
||||||
# if we have a list of initial packages, check them
|
# if we have a list of initial packages, check them
|
||||||
if init:
|
if init:
|
||||||
# Strictly speaking, we do not undo with a force-hint, but
|
if not force:
|
||||||
# force takes a different code path do it doesn't really
|
lundo = []
|
||||||
# matter.
|
|
||||||
undo = True
|
|
||||||
self.output_write("leading: %s\n" % (",".join([ x.uvname for x in init ])))
|
self.output_write("leading: %s\n" % (",".join([ x.uvname for x in init ])))
|
||||||
for x in init:
|
for x in init:
|
||||||
if x not in upgrade_me:
|
if x not in upgrade_me:
|
||||||
@ -2239,8 +2239,7 @@ class Britney(object):
|
|||||||
if not force:
|
if not force:
|
||||||
self.output_write("orig: %s\n" % self.eval_nuninst(nuninst_start))
|
self.output_write("orig: %s\n" % self.eval_nuninst(nuninst_start))
|
||||||
|
|
||||||
lundo = []
|
|
||||||
nuninst_end = None
|
|
||||||
if init:
|
if init:
|
||||||
# init => a hint (e.g. "easy") - so do the hint run
|
# init => a hint (e.g. "easy") - so do the hint run
|
||||||
(nuninst_end, extra) = self.iter_packages(init, selected, hint=True, lundo=lundo)
|
(nuninst_end, extra) = self.iter_packages(init, selected, hint=True, lundo=lundo)
|
||||||
@ -2284,7 +2283,7 @@ class Britney(object):
|
|||||||
self.sort_actions()
|
self.sort_actions()
|
||||||
else:
|
else:
|
||||||
self.output_write("FAILED\n")
|
self.output_write("FAILED\n")
|
||||||
if not undo: return
|
if not lundo: return
|
||||||
|
|
||||||
self.undo_changes(lundo, self.systems, self.sources, self.binaries)
|
self.undo_changes(lundo, self.systems, self.sources, self.binaries)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user