1 |
Author: zmedico |
2 |
Date: 2008-10-04 05:40:27 +0000 (Sat, 04 Oct 2008) |
3 |
New Revision: 11618 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/_emerge/__init__.py |
7 |
Log: |
8 |
Fix depgraph._add_pkg() to ensure that the existing package in the graph |
9 |
matches the required atom in cases when a different package has been |
10 |
passed in. This solves a problem with silently unsatisfied USE deps that |
11 |
was reported by Jorge Manuel B. S. Vicetto <jmbsvicetto@g.o>. Now the |
12 |
unsatisfied dependency will result in a "slot conflict" rather than be |
13 |
silently ignored. |
14 |
|
15 |
|
16 |
Modified: main/trunk/pym/_emerge/__init__.py |
17 |
=================================================================== |
18 |
--- main/trunk/pym/_emerge/__init__.py 2008-10-04 05:09:23 UTC (rev 11617) |
19 |
+++ main/trunk/pym/_emerge/__init__.py 2008-10-04 05:40:27 UTC (rev 11618) |
20 |
@@ -4494,7 +4494,16 @@ |
21 |
existing_node = self._slot_pkg_map[pkg.root].get(pkg.slot_atom) |
22 |
slot_collision = False |
23 |
if existing_node: |
24 |
- if pkg.cpv == existing_node.cpv: |
25 |
+ existing_node_matches = pkg.cpv == existing_node.cpv |
26 |
+ if existing_node_matches and \ |
27 |
+ pkg != existing_node and \ |
28 |
+ dep.atom is not None: |
29 |
+ # Use package set for matching since it will match via |
30 |
+ # PROVIDE when necessary, while match_from_list does not. |
31 |
+ atom_set = InternalPackageSet(initial_atoms=[dep.atom]) |
32 |
+ if not atom_set.findAtomForPackage(existing_node): |
33 |
+ existing_node_matches = False |
34 |
+ if existing_node_matches: |
35 |
# The existing node can be reused. |
36 |
if args: |
37 |
for arg in args: |