summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/__init__.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 0e5a64f9d..6eae62d11 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -7130,14 +7130,22 @@ def action_build(settings, trees, mtimedb,
favorites=favorites)
if retval != os.EX_OK:
return retval
- if "--buildpkgonly" in myopts and \
- not mydepgraph.digraph.hasallzeros(ignore_priority=DepPriority.MEDIUM):
+ if "--buildpkgonly" in myopts:
+ graph_copy = mydepgraph.digraph.clone()
+ for node in graph_copy.order:
+ if not isinstance(node, Package):
+ graph_copy.remove(node)
+ if not graph_copy.hasallzeros(ignore_priority=DepPriority.MEDIUM):
print "\n!!! --buildpkgonly requires all dependencies to be merged."
print "!!! You have to merge the dependencies before you can build this package.\n"
return 1
else:
- if ("--buildpkgonly" in myopts):
- if not mydepgraph.digraph.hasallzeros(ignore_priority=DepPriority.MEDIUM):
+ if "--buildpkgonly" in myopts:
+ graph_copy = mydepgraph.digraph.clone()
+ for node in graph_copy.order:
+ if not isinstance(node, Package):
+ graph_copy.remove(node)
+ if not graph_copy.hasallzeros(ignore_priority=DepPriority.MEDIUM):
print "\n!!! --buildpkgonly requires all dependencies to be merged."
print "!!! Cannot merge requested packages. Merge deps and try again.\n"
return 1