More filtering binary package for visiblity in greedy atom handling.
authorZac Medico <zmedico@gentoo.org>
Sat, 21 Oct 2006 03:25:55 +0000 (03:25 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 21 Oct 2006 03:25:55 +0000 (03:25 -0000)
svn path=/main/trunk/; revision=4775

bin/emerge

index 5a65ef795887f8feac1145ae881c84537682fd62..fb3d4604dbc1ec4ca507f7aa7ca970b72b7cb987 100755 (executable)
@@ -1077,10 +1077,12 @@ class depgraph:
                                                        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
+                                               elif "--usepkg" in self.myopts:
+                                                       mymatches = bindb.match(myslot_atom)
+                                                       if "--usepkgonly" not in self.myopts:
+                                                               mymatches = portdb.visible(mymatches)
+                                                       if mymatches:
+                                                               available = True
                                                if available:
                                                        greedy_atoms.append((myarg, myslot_atom))
                        arg_atoms = greedy_atoms
@@ -1644,10 +1646,12 @@ class depgraph:
                                                        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
+                                               elif "--usepkg" in self.myopts:
+                                                       mymatches = bindb.match(myslot_atom)
+                                                       if "--usepkgonly" not in self.myopts:
+                                                               mymatches = portdb.visible(mymatches)
+                                                       if mymatches:
+                                                               available = True
                                                if available:
                                                        newlist.append(myslot_atom)
                mylist = newlist