1 |
Author: zmedico |
2 |
Date: 2009-06-29 22:41:55 +0000 (Mon, 29 Jun 2009) |
3 |
New Revision: 13735 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/_emerge/depgraph.py |
7 |
main/trunk/pym/portage/__init__.py |
8 |
Log: |
9 |
Move code from bug #258773 to dep_zapdeps, since the parent always needs to |
10 |
be passed in for atom validation in order to solve bug #275821. |
11 |
|
12 |
|
13 |
Modified: main/trunk/pym/_emerge/depgraph.py |
14 |
=================================================================== |
15 |
--- main/trunk/pym/_emerge/depgraph.py 2009-06-29 19:09:45 UTC (rev 13734) |
16 |
+++ main/trunk/pym/_emerge/depgraph.py 2009-06-29 22:41:55 UTC (rev 13735) |
17 |
@@ -1593,18 +1593,12 @@ |
18 |
pkgsettings = self.pkgsettings[root] |
19 |
if trees is None: |
20 |
trees = self._filtered_trees |
21 |
- if not getattr(priority, "buildtime", False): |
22 |
- # The parent should only be passed to dep_check() for buildtime |
23 |
- # dependencies since that's the only case when it's appropriate |
24 |
- # to trigger the circular dependency avoidance code which uses it. |
25 |
- # It's important not to trigger the same circular dependency |
26 |
- # avoidance code for runtime dependencies since it's not needed |
27 |
- # and it can promote an incorrect package choice. |
28 |
- parent = None |
29 |
if True: |
30 |
try: |
31 |
if parent is not None: |
32 |
trees[root]["parent"] = parent |
33 |
+ if priority is not None: |
34 |
+ trees[root]["priority"] = priority |
35 |
if not strict: |
36 |
portage.dep._dep_check_strict = False |
37 |
mycheck = portage.dep_check(depstring, None, |
38 |
@@ -1613,6 +1607,8 @@ |
39 |
finally: |
40 |
if parent is not None: |
41 |
trees[root].pop("parent") |
42 |
+ if priority is not None: |
43 |
+ trees[root].pop("priority") |
44 |
portage.dep._dep_check_strict = True |
45 |
if not mycheck[0]: |
46 |
raise portage.exception.InvalidDependString(mycheck[1]) |
47 |
|
48 |
Modified: main/trunk/pym/portage/__init__.py |
49 |
=================================================================== |
50 |
--- main/trunk/pym/portage/__init__.py 2009-06-29 19:09:45 UTC (rev 13734) |
51 |
+++ main/trunk/pym/portage/__init__.py 2009-06-29 22:41:55 UTC (rev 13735) |
52 |
@@ -7058,6 +7058,7 @@ |
53 |
|
54 |
# Alias the trees we'll be checking availability against |
55 |
parent = trees[myroot].get("parent") |
56 |
+ priority = trees[myroot].get("priority") |
57 |
graph_db = trees[myroot].get("graph_db") |
58 |
vardb = None |
59 |
if "vartree" in trees[myroot]: |
60 |
@@ -7134,12 +7135,14 @@ |
61 |
all_in_graph = False |
62 |
break |
63 |
if all_in_graph: |
64 |
- if parent is None: |
65 |
+ if parent is None or priority is None: |
66 |
preferred_not_installed.append(this_choice) |
67 |
- else: |
68 |
+ elif priority.buildtime: |
69 |
# Check if the atom would result in a direct circular |
70 |
# dependency and try to avoid that if it seems likely |
71 |
- # to be unresolvable. |
72 |
+ # to be unresolvable. This is only relevant for |
73 |
+ # buildtime deps that aren't already satisfied by an |
74 |
+ # installed package. |
75 |
cpv_slot_list = [parent] |
76 |
circular_atom = None |
77 |
for atom in atoms: |