From ed589e570b592a8aad5665f8763e947164abd1ce Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 30 Aug 2008 06:10:22 +0000 Subject: =?UTF-8?q?In=20dep=5Fzapdeps(),=20add=20a=20new=20choice=20catego?= =?UTF-8?q?ry=20for=20choices=20that=20have=20packages=20that=20aren't=20y?= =?UTF-8?q?et=20installed=20but=20have=20been=20added=20to=20the=20graph.?= =?UTF-8?q?=20This=20category=20is=20given=20lower=20priority=20that=20the?= =?UTF-8?q?=20category=20for=20packages=20that=20are=20already=20installed?= =?UTF-8?q?.=20This=20helps=20dep=5Fzapdeps()=20avoid=20making=20choices?= =?UTF-8?q?=20in=20some=20cases=20that=20would=20result=20in=20an=20unsolv?= =?UTF-8?q?able=20circular=20dependency.=20Thanks=20to=20Diego=20"Flameeye?= =?UTF-8?q?s"=20Petten=C3=B2=20for=20reporting=20a=20circular=20dependency?= =?UTF-8?q?=20issue=20involving=20that=20java=20overlay=20which=20is=20sol?= =?UTF-8?q?ved=20by=20this=20patch.=20The=20particular=20issue=20was=20tri?= =?UTF-8?q?ggered=20when=20attempting=20to=20install=20dev-java/icedtea6?= =?UTF-8?q?=20for=20the=20first=20time.=20A=20circular=20dependency=20betw?= =?UTF-8?q?een=20dev-java/eclipse-ecj-3.2.2-r1=20and=20dev-java/icedtea6-1?= =?UTF-8?q?.2=20occured=20since=20icedtea6=20was=20chosen=20to=20satisfy?= =?UTF-8?q?=20the=20jdk=20dependency=20of=20eclipse-ecj,=20even=20though?= =?UTF-8?q?=20sun-jdk-1.6.0.07=20was=20already=20installed=20and=20capable?= =?UTF-8?q?=20of=20satisfying=20the=20dependency.=20This=20patch=20solves?= =?UTF-8?q?=20the=20issue=20by=20causing=20sun-jdk=20to=20be=20properly=20?= =?UTF-8?q?selected=20to=20satisfy=20the=20jdk=20dependency=20of=20eclipse?= =?UTF-8?q?-ecj.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/main/trunk/; revision=11478 --- pym/portage/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pym') 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:] -- cgit v1.2.3-1-g7c22