mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-31 12:21:30 +00:00
solver: Merge some loops to reduce nesting level
Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
b61e1086bd
commit
af20634b12
@ -146,10 +146,9 @@ class InstallabilitySolver(object):
|
||||
sat_in_testing = self._inst_tester.any_of_these_are_in_the_suite
|
||||
universe = self._universe
|
||||
debug_solver = self.logger.isEnabledFor(logging.DEBUG)
|
||||
for r in rms:
|
||||
for rdep in chain.from_iterable(universe.reverse_dependencies_of(r) for r in rms):
|
||||
# The binaries have reverse dependencies in testing;
|
||||
# check if we can/should migrate them first.
|
||||
for rdep in universe.reverse_dependencies_of(r):
|
||||
for depgroup in universe.dependencies_of(rdep):
|
||||
rigid = depgroup - going_out
|
||||
if sat_in_testing(rigid):
|
||||
@ -169,11 +168,10 @@ class InstallabilitySolver(object):
|
||||
sat_in_testing = self._inst_tester.any_of_these_are_in_the_suite
|
||||
universe = self._universe
|
||||
debug_solver = self.logger.isEnabledFor(logging.DEBUG)
|
||||
for a in adds:
|
||||
for depgroup in chain.from_iterable(universe.dependencies_of(a) for a in adds):
|
||||
# Check if this item should migrate before others
|
||||
# (e.g. because they depend on a new [version of a]
|
||||
# binary provided by this item).
|
||||
for depgroup in universe.dependencies_of(a):
|
||||
rigid = depgroup - going_out
|
||||
if sat_in_testing(rigid):
|
||||
# (partly) satisfied by testing, assume it is okay
|
||||
|
Loading…
x
Reference in New Issue
Block a user