In greedy atom handlink, filter binary package for visiblity.
authorZac Medico <zmedico@gentoo.org>
Sat, 21 Oct 2006 03:16:15 +0000 (03:16 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 21 Oct 2006 03:16:15 +0000 (03:16 -0000)
svn path=/main/trunk/; revision=4774

bin/emerge

index e84017be5dcc742b54bd22364a676cc78c299f8e..5a65ef795887f8feac1145ae881c84537682fd62 100755 (executable)
@@ -1051,7 +1051,10 @@ class depgraph:
                                if myslots:
                                        best_pkgs = []
                                        if "--usepkg" in self.myopts:
-                                               best_pkg = portage.best(bindb.match(myatom))
+                                               mymatches = bindb.match(myatom)
+                                               if "--usepkgonly" not in self.myopts:
+                                                       mymatches = portdb.visible(mymatches)
+                                               best_pkg = portage.best(mymatches)
                                                if best_pkg:
                                                        best_slot = bindb.aux_get(best_pkg, ["SLOT"])[0]
                                                        best_pkgs.append(("binary", best_pkg, best_slot))
@@ -1616,7 +1619,10 @@ class depgraph:
                                if myslots:
                                        best_pkgs = []
                                        if "--usepkg" in self.myopts:
-                                               best_pkg = portage.best(bindb.match(atom))
+                                               mymatches = bindb.match(atom)
+                                               if "--usepkgonly" not in self.myopts:
+                                                       mymatches = portdb.visible(mymatches)
+                                               best_pkg = portage.best(mymatches)
                                                if best_pkg:
                                                        best_slot = bindb.aux_get(best_pkg, ["SLOT"])[0]
                                                        best_pkgs.append(("binary", best_pkg, best_slot))