Lines 4156-4161
Link Here
|
4156 |
# d) is the first item |
4156 |
# d) is the first item |
4157 |
|
4157 |
|
4158 |
preferred = [] |
4158 |
preferred = [] |
|
|
4159 |
preferred_any_slot = [] |
4159 |
possible_upgrades = [] |
4160 |
possible_upgrades = [] |
4160 |
other = [] |
4161 |
other = [] |
4161 |
|
4162 |
|
Lines 4209-4216
Link Here
|
4209 |
if not vardb.match(atom) and not atom.startswith("virtual/"): |
4210 |
if not vardb.match(atom) and not atom.startswith("virtual/"): |
4210 |
all_installed = False |
4211 |
all_installed = False |
4211 |
break |
4212 |
break |
|
|
4213 |
all_installed_slots = False |
4212 |
if all_installed: |
4214 |
if all_installed: |
4213 |
preferred.append(this_choice) |
4215 |
all_installed_slots = True |
|
|
4216 |
for slot_atom in versions: |
4217 |
# New-style virtuals have zero cost to install. |
4218 |
if not vardb.match(slot_atom) and \ |
4219 |
not slot_atom.startswith("virtual/"): |
4220 |
all_installed_slots = False |
4221 |
break |
4222 |
if all_installed: |
4223 |
if all_installed_slots: |
4224 |
preferred.append(this_choice) |
4225 |
else: |
4226 |
preferred_any_slot.append(this_choice) |
4214 |
else: |
4227 |
else: |
4215 |
possible_upgrades.append(this_choice) |
4228 |
possible_upgrades.append(this_choice) |
4216 |
else: |
4229 |
else: |
Lines 4222-4227
Link Here
|
4222 |
# into || ( highest version ... lowest version ). We want to prefer the |
4235 |
# into || ( highest version ... lowest version ). We want to prefer the |
4223 |
# highest all_available version of the new-style virtual when there is a |
4236 |
# highest all_available version of the new-style virtual when there is a |
4224 |
# lower all_installed version. |
4237 |
# lower all_installed version. |
|
|
4238 |
preferred.extend(preferred_any_slot) |
4225 |
preferred.extend(possible_upgrades) |
4239 |
preferred.extend(possible_upgrades) |
4226 |
possible_upgrades = preferred[1:] |
4240 |
possible_upgrades = preferred[1:] |
4227 |
for possible_upgrade in possible_upgrades: |
4241 |
for possible_upgrade in possible_upgrades: |