diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-04-10 08:41:28 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-04-10 08:41:28 +0000 |
commit | 1caa4c4bfc6222f769c83cd6660a0e8cf86d8e9e (patch) | |
tree | a12fdc220ec7c3885de62ae04020101d3fc40d9d | |
parent | 4e2525b656c90531ba080209e85930b2d5fa89b5 (diff) | |
download | portage-1caa4c4bfc6222f769c83cd6660a0e8cf86d8e9e.tar.gz portage-1caa4c4bfc6222f769c83cd6660a0e8cf86d8e9e.tar.bz2 portage-1caa4c4bfc6222f769c83cd6660a0e8cf86d8e9e.zip |
Make sure that everything except Package nodes is ignored when doing
the --buildpkgonly digraph.hasallzeros() check.
svn path=/main/trunk/; revision=9797
-rw-r--r-- | pym/_emerge/__init__.py | 16 |
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 |