From: Zac Medico Date: Thu, 30 Apr 2009 07:04:09 +0000 (-0000) Subject: Filter virtuals when expanding atoms if it helps to avoid an ambiguity. X-Git-Tag: v2.1.6.12~88 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2468c90b69847374e3f56d1b8ca1767af5269682;p=portage.git Filter virtuals when expanding atoms if it helps to avoid an ambiguity. (trunk r13314) svn path=/main/branches/2.1.6/; revision=13485 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index dc0dbc3d2..f23217381 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -5586,6 +5586,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 \