For bug #4698, use slot deps to ensure that all installed slots are automatically...
authorZac Medico <zmedico@gentoo.org>
Thu, 5 Oct 2006 06:50:05 +0000 (06:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 5 Oct 2006 06:50:05 +0000 (06:50 -0000)
svn path=/main/trunk/; revision=4595

bin/emerge

index 90c1778b165c019cbeaf661eb5fa32ff221d3803..d2d3e768e78a298ab6b88497f796dc1957a40d5e 100755 (executable)
@@ -1307,6 +1307,7 @@ class depgraph:
                return retlist
 
        def xcreate(self,mode="system"):
+               vardb = self.trees[self.target_root]["vartree"].dbapi
                world_problems = False
                if mode=="system":
                        mylist = getlist(self.settings, "system")
@@ -1328,10 +1329,20 @@ class depgraph:
 
                newlist = []
                for atom in mylist:
-                       if portage.dep_getkey(atom).split("/")[-1] == "portage":
+                       mykey = portage.dep_getkey(atom)
+                       if portage.catsplit(mykey)[-1] == "portage":
                                newlist.insert(0, atom)
                        else:
                                newlist.append(atom)
+                               """Make sure all installed slots are updated when possible.
+                               Do this with --emptytree also, to ensure that all slots are
+                               remerged."""
+                               myslots = set()
+                               for cpv in vardb.match(mykey):
+                                       myslots.add(vardb.aux_get(cpv, ["SLOT"])[0])
+                               if len(myslots) > 1:
+                                       for myslot in myslots:
+                                               newlist.append("%s:%s" % (mykey, myslot))
                mylist = newlist
                
                missing_atoms = []