summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-06-30 01:16:53 +0000
committerZac Medico <zmedico@gentoo.org>2009-06-30 01:16:53 +0000
commit31a8c3a4b7ddf530eb9094b9110ea068acdbbc31 (patch)
tree8e13387792ef0a32345a1f841555bc6636ad96f1
parent7aa2774e27020c0ddffecb0a66f3b7ff3ea5b019 (diff)
downloadportage-31a8c3a4b7ddf530eb9094b9110ea068acdbbc31.tar.gz
portage-31a8c3a4b7ddf530eb9094b9110ea068acdbbc31.tar.bz2
portage-31a8c3a4b7ddf530eb9094b9110ea068acdbbc31.zip
Remove the upgrade selection code inside dep_zapdeps (from bug #171840 and
bug #159360) since the code in depgraph._dep_check_composite_db._visible() from bug #253904 now masks choices that do not match the highest available version in the slot. This means that such undesirable choices automatically go into the dep_zapdeps "other" category. svn path=/main/trunk/; revision=13740
-rw-r--r--pym/portage/__init__.py45
1 files changed, 2 insertions, 43 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index a9c11fade..f98dbbb1d 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -7191,49 +7191,8 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
else:
other.append(this_choice)
- # Compare the "all_installed" choices against the "all_available" choices
- # for possible missed upgrades. The main purpose of this code is to find
- # upgrades of new-style virtuals since _expand_new_virtuals() expands them
- # 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.
- preferred = preferred_in_graph + preferred_installed + preferred_any_slot + preferred_non_installed
- 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:
- continue
- has_upgrade = False
- has_downgrade = False
- for myslot in intersecting_slots:
- myversion = versions[myslot]
- o_version = o_versions[myslot]
- difference = pkgcmp(catpkgsplit(myversion)[1:],
- catpkgsplit(o_version)[1:])
- if difference:
- if difference > 0:
- has_upgrade = True
- else:
- 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)
- break
-
- # preferred now contains a) and c) from the order above with
- # the masked flag differentiating the two. other contains b)
- # and d) so adding other to preferred will give us a suitable
- # list to iterate over.
- preferred.extend(other)
+ preferred = preferred_in_graph + preferred_installed + \
+ preferred_any_slot + preferred_non_installed + other
for allow_masked in (False, True):
for atoms, versions, all_available in preferred: