summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-03-23 01:25:55 +0000
committerZac Medico <zmedico@gentoo.org>2007-03-23 01:25:55 +0000
commitbc40f2ce0646f44577050ca11e2a21c6b1070520 (patch)
tree0d22f04efb170c0f5b3d7b0b54ced38138d58a2f /pym
parent452632ca35a8c2c874f2e603e200ba39c5822ad7 (diff)
downloadportage-bc40f2ce0646f44577050ca11e2a21c6b1070520.tar.gz
portage-bc40f2ce0646f44577050ca11e2a21c6b1070520.tar.bz2
portage-bc40f2ce0646f44577050ca11e2a21c6b1070520.zip
For bug #171840, consider all choices for slot intersection and promote those that have upgrades relative to other choices.
svn path=/main/trunk/; revision=6267
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 2d04df180..b2f9ad8fe 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -4288,10 +4288,15 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
# into || ( highest version ... lowest version ). We want to prefer the
# highest all_available version of the new-style virtual when there is a
# lower all_installed version.
- for possible_upgrade in list(possible_upgrades):
+ preferred.extend(possible_upgrades)
+ possible_upgrades = preferred[1:]
+ for possible_upgrade in possible_upgrades:
atoms, versions, all_available = possible_upgrade
myslots = set(versions)
for other_choice in preferred:
+ if possible_upgrade is other_choice:
+ # possible_upgrade will not be promoted, so move on
+ break
o_atoms, o_versions, o_all_available = other_choice
intersecting_slots = myslots.intersection(o_versions)
if not intersecting_slots:
@@ -4308,11 +4313,10 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
has_downgrade = True
break
if has_upgrade and not has_downgrade:
+ preferred.remove(possible_upgrade)
o_index = preferred.index(other_choice)
preferred.insert(o_index, possible_upgrade)
- possible_upgrades.remove(possible_upgrade)
break
- preferred.extend(possible_upgrades)
# preferred now contains a) and c) from the order above with
# the masked flag differentiating the two. other contains b)