Fix a crash during installability testing

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
master
Adam D. Barratt 10 years ago
parent 03d15c2ae5
commit 4f48872102

@ -280,10 +280,6 @@ class InstallabilityTester(object):
# is smaller than testing (so presumably faster) # is smaller than testing (so presumably faster)
remain = choice - never - cbroken remain = choice - never - cbroken
if not remain:
# all alternatives would violate the conflicts => package is not installable
return None
if len(remain) > 1 and not remain.isdisjoint(safe_set): if len(remain) > 1 and not remain.isdisjoint(safe_set):
first = None first = None
for r in ifilter(safe_set.__contains__, remain): for r in ifilter(safe_set.__contains__, remain):
@ -305,6 +301,12 @@ class InstallabilityTester(object):
check.update(remain) check.update(remain)
musts.update(remain) musts.update(remain)
continue continue
if not remain:
# all alternatives would violate the conflicts or are uninstallable
# => package is not installable
return None
# The choice is still deferred # The choice is still deferred
rebuild.add(frozenset(remain)) rebuild.add(frozenset(remain))

Loading…
Cancel
Save