Make system/world less greedy for bug #150251.
authorZac Medico <zmedico@gentoo.org>
Sun, 8 Oct 2006 20:50:53 +0000 (20:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 8 Oct 2006 20:50:53 +0000 (20:50 -0000)
svn path=/main/trunk/; revision=4619

bin/emerge

index 662c2dc0cb42d63084ba8554ab1800e2f594e803..f927ae3bf39d573a3a6d2fcd7006a5fbd1a68713 100755 (executable)
@@ -1392,7 +1392,18 @@ class depgraph:
                                        myslots.add(vardb.aux_get(cpv, ["SLOT"])[0])
                                if len(myslots) > 1:
                                        for myslot in myslots:
-                                               newlist.append("%s:%s" % (mykey, myslot))
+                                               myslot_atom = "%s:%s" % (mykey, myslot)
+                                               available = False
+                                               if "--usepkgonly" not in self.myopts and \
+                                                       self.trees[self.target_root][
+                                                       "porttree"].dbapi.match(myslot_atom):
+                                                       available = True
+                                               elif "--usepkg" in self.myopts and \
+                                                       self.trees[self.target_root][
+                                                       "bintree"].dbapi.match(myslot_atom):
+                                                       available = True
+                                               if available:
+                                                       newlist.append(myslot_atom)
                mylist = newlist
                
                missing_atoms = []