summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-10 08:43:34 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-10 08:43:34 +0000
commit253662071043b13a1f7a93c94873d333f2ad4aa7 (patch)
tree39c68ad36fc9c09e75118d96440a4f7471f54467 /bin
parentedea42c57b976f1d401900b42c55d788bc695c07 (diff)
downloadportage-253662071043b13a1f7a93c94873d333f2ad4aa7.tar.gz
portage-253662071043b13a1f7a93c94873d333f2ad4aa7.tar.bz2
portage-253662071043b13a1f7a93c94873d333f2ad4aa7.zip
Make sure that everything except Package nodes is ignored when doing
the --buildpkgonly digraph.hasallzeros() check. (trunk r9797) svn path=/main/branches/2.1.2/; revision=9798
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge16
1 files changed, 12 insertions, 4 deletions
diff --git a/bin/emerge b/bin/emerge
index 21af48674..6e97d5456 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -7142,14 +7142,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