summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/emerge20
1 files changed, 12 insertions, 8 deletions
diff --git a/bin/emerge b/bin/emerge
index 5a65ef795..fb3d4604d 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -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