mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-23 00:11:32 +00:00
Removed the notion of "depth" in britney
Presumably there once was a reason for having a notion of "depth", but these days only 3 "values" were given as "maxdepth": * "easy" (for easy hint) * 0 (for "main run" or in a "hint"-hint) * -1 (for force-hint) Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
e7b90af6db
commit
e7689715d2
22
britney.py
22
britney.py
@ -2151,7 +2151,7 @@ class Britney:
|
|||||||
|
|
||||||
return (nuninst_comp, extra, lundo)
|
return (nuninst_comp, extra, lundo)
|
||||||
|
|
||||||
def do_all(self, maxdepth=0, init=None, actions=None):
|
def do_all(self, hinttype=None, init=None, actions=None):
|
||||||
"""Testing update runner
|
"""Testing update runner
|
||||||
|
|
||||||
This method tries to update testing checking the uninstallability
|
This method tries to update testing checking the uninstallability
|
||||||
@ -2169,10 +2169,9 @@ class Britney:
|
|||||||
undo = False
|
undo = False
|
||||||
force = False
|
force = False
|
||||||
earlyabort = False
|
earlyabort = False
|
||||||
if maxdepth == "easy" or maxdepth < 0:
|
if hinttype == "easy" or hinttype == "force-hint":
|
||||||
force = maxdepth < 0
|
force = hinttype == "force-hint"
|
||||||
earlyabort = True
|
earlyabort = True
|
||||||
maxdepth = 0
|
|
||||||
|
|
||||||
# if we have a list of initial packages, check them
|
# if we have a list of initial packages, check them
|
||||||
if init:
|
if init:
|
||||||
@ -2335,9 +2334,7 @@ class Britney:
|
|||||||
self.do_hint("force-hint", x.user, x.packages)
|
self.do_hint("force-hint", x.user, x.packages)
|
||||||
|
|
||||||
# run the first round of the upgrade
|
# run the first round of the upgrade
|
||||||
self.__log("> First loop on the packages with depth = 0", type="I")
|
# - do separate runs for break arches
|
||||||
|
|
||||||
# separate runs for break arches
|
|
||||||
allpackages = []
|
allpackages = []
|
||||||
normpackages = self.upgrade_me[:]
|
normpackages = self.upgrade_me[:]
|
||||||
archpackages = {}
|
archpackages = {}
|
||||||
@ -2518,23 +2515,20 @@ class Britney:
|
|||||||
except IOError, e:
|
except IOError, e:
|
||||||
self.__log("Could not write %s: %s" % (histfile, e), type="W")
|
self.__log("Could not write %s: %s" % (histfile, e), type="W")
|
||||||
|
|
||||||
def do_hint(self, type, who, pkgvers):
|
def do_hint(self, hinttype, who, pkgvers):
|
||||||
"""Process hints
|
"""Process hints
|
||||||
|
|
||||||
This method process `easy`, `hint` and `force-hint` hints. If the
|
This method process `easy`, `hint` and `force-hint` hints. If the
|
||||||
requested version is not in unstable, then the hint is skipped.
|
requested version is not in unstable, then the hint is skipped.
|
||||||
"""
|
"""
|
||||||
hintinfo = {"easy": "easy",
|
|
||||||
"hint": 0,
|
|
||||||
"force-hint": -1,}
|
|
||||||
|
|
||||||
if isinstance(pkgvers[0], tuple) or isinstance(pkgvers[0], list):
|
if isinstance(pkgvers[0], tuple) or isinstance(pkgvers[0], list):
|
||||||
_pkgvers = [ HintItem('%s/%s' % (p, v)) for (p,v) in pkgvers ]
|
_pkgvers = [ HintItem('%s/%s' % (p, v)) for (p,v) in pkgvers ]
|
||||||
else:
|
else:
|
||||||
_pkgvers = pkgvers
|
_pkgvers = pkgvers
|
||||||
|
|
||||||
self.__log("> Processing '%s' hint from %s" % (type, who), type="I")
|
self.__log("> Processing '%s' hint from %s" % (hinttype, who), type="I")
|
||||||
self.output_write("Trying %s from %s: %s\n" % (type, who, " ".join( ["%s/%s" % (x.uvname, x.version) for x in _pkgvers])))
|
self.output_write("Trying %s from %s: %s\n" % (hinttype, who, " ".join( ["%s/%s" % (x.uvname, x.version) for x in _pkgvers])))
|
||||||
|
|
||||||
ok = True
|
ok = True
|
||||||
# loop on the requested packages and versions
|
# loop on the requested packages and versions
|
||||||
@ -2570,7 +2564,7 @@ class Britney:
|
|||||||
self.output_write("Not using hint\n")
|
self.output_write("Not using hint\n")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
self.do_all(hintinfo[type], _pkgvers)
|
self.do_all(hinttype, _pkgvers)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def sort_actions(self):
|
def sort_actions(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user