Don't exclude system virtuals from world since they can match multiple old-style...
authorZac Medico <zmedico@gentoo.org>
Fri, 6 Jul 2007 09:21:44 +0000 (09:21 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 6 Jul 2007 09:21:44 +0000 (09:21 -0000)
svn path=/main/branches/2.1.2/; revision=7181

bin/emerge

index 599c9bd6e495bb41da42c2ee2af24147670a4ba3..c9ce08464f0e73b1499564ba4e3a52e92a3a7f46 100755 (executable)
@@ -720,8 +720,16 @@ def create_world_atom(pkg_key, metadata, args_set, sets, portdb):
        if new_world_atom == sets["world"].findAtomForPackage(pkg_key, metadata):
                # Both atoms would be identical, so there's nothing to add.
                return None
-       if not slotted and sets["system"].findAtomForPackage(pkg_key, metadata):
-               return None
+       if not slotted:
+               # Unlike world atoms, system atoms are not greedy for slots, so they
+               # can't be safely excluded from world if they are slotted.
+               system_atom = sets["system"].findAtomForPackage(pkg_key, metadata)
+               if system_atom and \
+                       not portage.dep_getkey(system_atom).startswith("virtual/"):
+                       # System virtuals aren't safe to exclude from world since they can
+                       # match multiple old-style virtuals but only one of them will be
+                       # pulled in by update or depclean.
+                       return None
        return new_world_atom
 
 def filter_iuse_defaults(iuse):