@ -274,8 +274,7 @@ class InstallabilityTester(object):
# curry check_loop
# curry check_loop
check_loop = partial ( self . _check_loop , universe , testing ,
check_loop = partial ( self . _check_loop , universe , testing ,
eqv_table , stats , musts , never , choices ,
eqv_table , stats , musts , never , cbroken )
cbroken )
# Useful things to remember:
# Useful things to remember:
#
#
@ -310,7 +309,7 @@ class InstallabilityTester(object):
rebuild .
rebuild .
"""
"""
# We already satisfied/chosen at least one of the lit t erals
# We already satisfied/chosen at least one of the lit erals
# in the choice, so the choice is gone
# in the choice, so the choice is gone
for choice in filter ( musts . isdisjoint , choices ) :
for choice in filter ( musts . isdisjoint , choices ) :
# cbroken is needed here because (in theory) it could
# cbroken is needed here because (in theory) it could
@ -363,7 +362,7 @@ class InstallabilityTester(object):
check_tmp = set ( [ p ] )
check_tmp = set ( [ p ] )
if not self . _check_loop ( universe , testing , eqv_table ,
if not self . _check_loop ( universe , testing , eqv_table ,
stats , musts_copy , never_tmp ,
stats , musts_copy , never_tmp ,
c hoices_tmp, cbroken ,
c broken, choices_tmp ,
check_tmp ) :
check_tmp ) :
# p cannot be chosen/is broken (unlikely, but ...)
# p cannot be chosen/is broken (unlikely, but ...)
continue
continue
@ -417,7 +416,7 @@ class InstallabilityTester(object):
# END _pick_choice
# END _pick_choice
while check :
while check :
if not check_loop ( ch eck) :
if not check_loop ( ch oices, ch eck) :
verdict = False
verdict = False
break
break
@ -444,7 +443,7 @@ class InstallabilityTester(object):
return verdict
return verdict
def _check_loop ( self , universe , testing , eqv_table , stats , musts , never ,
def _check_loop ( self , universe , testing , eqv_table , stats , musts , never ,
c hoices, cbroken , check , len = len ,
c broken, choices , check , len = len ,
frozenset = frozenset ) :
frozenset = frozenset ) :
""" Finds all guaranteed dependencies via " check " .
""" Finds all guaranteed dependencies via " check " .
@ -475,7 +474,7 @@ class InstallabilityTester(object):
# so "obviously" we can never choose any of its conflicts
# so "obviously" we can never choose any of its conflicts
never . update ( cons & testing )
never . update ( cons & testing )
# depgroup can be satis i fed by picking something that is
# depgroup can be satis fi ed by picking something that is
# already in musts - lets pick that (again). :)
# already in musts - lets pick that (again). :)
for depgroup in not_satisfied ( deps ) :
for depgroup in not_satisfied ( deps ) :
@ -552,8 +551,8 @@ class InstallabilityTester(object):
while ess_base :
while ess_base :
self . _check_loop ( universe , testing , eqv_table , stats ,
self . _check_loop ( universe , testing , eqv_table , stats ,
start , ess_never , ess_choices ,
start , ess_never , cbroken ,
cbroken , ess_base )
ess_choices , ess_base )
if ess_choices :
if ess_choices :
# Try to break choices where possible
# Try to break choices where possible
nchoice = set ( )
nchoice = set ( )