@ -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 maxdept h == " 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 , hint type, 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 " % ( hint type, 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 " % ( hint type, 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 ( hint info[ type] , _pkgvers )
self . do_all ( hint type, _pkgvers )
return True
return True
def sort_actions ( self ) :
def sort_actions ( self ) :