Merged from trunk -r13313:13316
authorFabian Groffen <grobian@gentoo.org>
Sat, 11 Apr 2009 11:41:41 +0000 (11:41 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 11 Apr 2009 11:41:41 +0000 (11:41 -0000)
   | 13314   | Filter virtuals when expanding atoms if it helps to avoid an |
   | zmedico | ambiguity.                                                   |

   | 13315   | Show an error message when deletion of stale cache fails.    |
   | zmedico |                                                              |

   | 13316   | Avoid leaking some variables from ebuild_main() into the     |
   | zmedico | environment (local variables are exposed to 'children').     |

svn path=/main/branches/prefix/; revision=13322

bin/egencache
pym/_emerge/__init__.py

index 89708ad71fc5698fd97707a8739e516fba178713..4103651d50d44b3eb1f6f337929a303c2e94a099 100755 (executable)
@@ -244,8 +244,11 @@ class GenCache(object):
                                        del trg_cache[k]
                                except KeyError:
                                        pass
-                               except CacheError:
+                               except CacheError, ce:
                                        self.returncode |= 1
+                                       writemsg_level(
+                                               "%s deleting stale cache: %s\n" % (k, ce),
+                                               level=logging.ERROR, noiselevel=-1)
 
                if not trg_cache.autocommits:
                        try:
index 3afe96d022a80de4ce064268a506ccc81671698a..8c33769ca7eb366662f8e4a6b33a316115366176 100644 (file)
@@ -5629,6 +5629,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 \