From 253662071043b13a1f7a93c94873d333f2ad4aa7 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 10 Apr 2008 08:43:34 +0000 Subject: [PATCH] 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 --- bin/emerge | 16 ++++++++++++---- 1 file 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 -- 2.26.2