diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-08-30 06:10:22 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-08-30 06:10:22 +0000 |
commit | ed589e570b592a8aad5665f8763e947164abd1ce (patch) | |
tree | a2ed83f81567d2b43238d3e4644cf0ee16eef2a4 | |
parent | d2c55e30f5c1944b1b02dfebc9a93e6ffcd8fd0b (diff) | |
download | portage-ed589e570b592a8aad5665f8763e947164abd1ce.tar.gz portage-ed589e570b592a8aad5665f8763e947164abd1ce.tar.bz2 portage-ed589e570b592a8aad5665f8763e947164abd1ce.zip |
In dep_zapdeps(), add a new choice category for choices that have packages
that aren't yet installed but have been added to the graph. This category
is given lower priority that the category for packages that are already
installed. This helps dep_zapdeps() avoid making choices in some cases that
would result in an unsolvable circular dependency. Thanks to Diego "Flameeyes"
Pettenò for reporting a circular dependency issue involving that java overlay
which is solved by this patch. The particular issue was triggered when
attempting to install dev-java/icedtea6 for the first time. A circular
dependency between dev-java/eclipse-ecj-3.2.2-r1 and dev-java/icedtea6-1.2
occured since icedtea6 was chosen to satisfy the jdk dependency of
eclipse-ecj, even though sun-jdk-1.6.0.07 was already installed and capable of
satisfying the dependency. This patch solves the issue by causing sun-jdk to
be properly selected to satisfy the jdk dependency of eclipse-ecj.
svn path=/main/trunk/; revision=11478
-rw-r--r-- | pym/portage/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index a97f1eec7..3bcb0b06c 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -6218,6 +6218,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None): # d) is the first item preferred = [] + preferred_not_installed = [] preferred_any_slot = [] possible_upgrades = [] other = [] @@ -6298,7 +6299,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None): break if all_in_graph: if parent is None: - preferred.append(this_choice) + preferred_not_installed.append(this_choice) else: # Check if the atom would result in a direct circular # dependency and try to avoid that if it seems likely @@ -6318,7 +6319,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None): circular_atom = atom break if circular_atom is None: - preferred.append(this_choice) + preferred_not_installed.append(this_choice) else: other.append(this_choice) else: @@ -6332,6 +6333,7 @@ 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. + preferred.extend(preferred_not_installed) preferred.extend(preferred_any_slot) preferred.extend(possible_upgrades) possible_upgrades = preferred[1:] |