From: Zac Medico Date: Sat, 11 Apr 2009 02:19:27 +0000 (-0000) Subject: Filter virtuals when expanding atoms if it helps to avoid an ambiguity. X-Git-Tag: v2.2_rc29~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4423a7e1f03c96c0d9dc64af271fb01342a85cfc;p=portage.git Filter virtuals when expanding atoms if it helps to avoid an ambiguity. svn path=/main/trunk/; revision=13314 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 5c9f83744..c8bdfae96 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -5602,6 +5602,15 @@ class depgraph(object): atom_cp = portage.dep_getkey(atom) if vardb.cp_list(atom_cp): installed_cp_set.add(atom_cp) + + if len(installed_cp_set) > 1: + non_virtual_cps = set() + for atom_cp in installed_cp_set: + if not atom_cp.startswith("virtual/"): + non_virtual_cps.add(atom_cp) + if len(non_virtual_cps) == 1: + installed_cp_set = non_virtual_cps + if len(expanded_atoms) > 1 and len(installed_cp_set) == 1: installed_cp = iter(installed_cp_set).next() expanded_atoms = [atom for atom in expanded_atoms \