Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r11478 - main/trunk/pym/portage
Date: Sat, 30 Aug 2008 06:10:27
Message-Id: E1KZJfD-0000kn-JP@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-08-30 06:10:22 +0000 (Sat, 30 Aug 2008)
3 New Revision: 11478
4
5 Modified:
6 main/trunk/pym/portage/__init__.py
7 Log:
8 In dep_zapdeps(), add a new choice category for choices that have packages
9 that aren't yet installed but have been added to the graph. This category
10 is given lower priority that the category for packages that are already
11 installed. This helps dep_zapdeps() avoid making choices in some cases that
12 would result in an unsolvable circular dependency. Thanks to Diego "Flameeyes"
13 Petten?\195?\178 for reporting a circular dependency issue involving that java overlay
14 which is solved by this patch. The particular issue was triggered when
15 attempting to install dev-java/icedtea6 for the first time. A circular
16 dependency between dev-java/eclipse-ecj-3.2.2-r1 and dev-java/icedtea6-1.2
17 occured since icedtea6 was chosen to satisfy the jdk dependency of
18 eclipse-ecj, even though sun-jdk-1.6.0.07 was already installed and capable of
19 satisfying the dependency. This patch solves the issue by causing sun-jdk to
20 be properly selected to satisfy the jdk dependency of eclipse-ecj.
21
22
23 Modified: main/trunk/pym/portage/__init__.py
24 ===================================================================
25 --- main/trunk/pym/portage/__init__.py 2008-08-27 18:00:00 UTC (rev 11477)
26 +++ main/trunk/pym/portage/__init__.py 2008-08-30 06:10:22 UTC (rev 11478)
27 @@ -6218,6 +6218,7 @@
28 # d) is the first item
29
30 preferred = []
31 + preferred_not_installed = []
32 preferred_any_slot = []
33 possible_upgrades = []
34 other = []
35 @@ -6298,7 +6299,7 @@
36 break
37 if all_in_graph:
38 if parent is None:
39 - preferred.append(this_choice)
40 + preferred_not_installed.append(this_choice)
41 else:
42 # Check if the atom would result in a direct circular
43 # dependency and try to avoid that if it seems likely
44 @@ -6318,7 +6319,7 @@
45 circular_atom = atom
46 break
47 if circular_atom is None:
48 - preferred.append(this_choice)
49 + preferred_not_installed.append(this_choice)
50 else:
51 other.append(this_choice)
52 else:
53 @@ -6332,6 +6333,7 @@
54 # into || ( highest version ... lowest version ). We want to prefer the
55 # highest all_available version of the new-style virtual when there is a
56 # lower all_installed version.
57 + preferred.extend(preferred_not_installed)
58 preferred.extend(preferred_any_slot)
59 preferred.extend(possible_upgrades)
60 possible_upgrades = preferred[1:]