1 |
Author: zmedico |
2 |
Date: 2009-04-30 07:04:09 +0000 (Thu, 30 Apr 2009) |
3 |
New Revision: 13485 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.6/pym/_emerge/__init__.py |
7 |
Log: |
8 |
Filter virtuals when expanding atoms if it helps to avoid an ambiguity. |
9 |
(trunk r13314) |
10 |
|
11 |
Modified: main/branches/2.1.6/pym/_emerge/__init__.py |
12 |
=================================================================== |
13 |
--- main/branches/2.1.6/pym/_emerge/__init__.py 2009-04-30 07:03:56 UTC (rev 13484) |
14 |
+++ main/branches/2.1.6/pym/_emerge/__init__.py 2009-04-30 07:04:09 UTC (rev 13485) |
15 |
@@ -5586,6 +5586,15 @@ |
16 |
atom_cp = portage.dep_getkey(atom) |
17 |
if vardb.cp_list(atom_cp): |
18 |
installed_cp_set.add(atom_cp) |
19 |
+ |
20 |
+ if len(installed_cp_set) > 1: |
21 |
+ non_virtual_cps = set() |
22 |
+ for atom_cp in installed_cp_set: |
23 |
+ if not atom_cp.startswith("virtual/"): |
24 |
+ non_virtual_cps.add(atom_cp) |
25 |
+ if len(non_virtual_cps) == 1: |
26 |
+ installed_cp_set = non_virtual_cps |
27 |
+ |
28 |
if len(expanded_atoms) > 1 and len(installed_cp_set) == 1: |
29 |
installed_cp = iter(installed_cp_set).next() |
30 |
expanded_atoms = [atom for atom in expanded_atoms \ |