From: Zac Medico Date: Thu, 10 Apr 2008 09:11:56 +0000 (-0000) Subject: Iterate over a copy of the digraph nodes so that removal can't break X-Git-Tag: v2.1.5~208 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d8248bfc424ba70ab4a524e3a232d80eb27ed094;p=portage.git Iterate over a copy of the digraph nodes so that removal can't break the iterator. (trunk r9799) svn path=/main/branches/2.1.2/; revision=9800 --- diff --git a/bin/emerge b/bin/emerge index 6e97d5456..575a03d53 100755 --- a/bin/emerge +++ b/bin/emerge @@ -7144,7 +7144,7 @@ def action_build(settings, trees, mtimedb, return retval if "--buildpkgonly" in myopts: graph_copy = mydepgraph.digraph.clone() - for node in graph_copy.order: + for node in list(graph_copy.order): if not isinstance(node, Package): graph_copy.remove(node) if not graph_copy.hasallzeros(ignore_priority=DepPriority.MEDIUM): @@ -7154,7 +7154,7 @@ def action_build(settings, trees, mtimedb, else: if "--buildpkgonly" in myopts: graph_copy = mydepgraph.digraph.clone() - for node in graph_copy.order: + for node in list(graph_copy.order): if not isinstance(node, Package): graph_copy.remove(node) if not graph_copy.hasallzeros(ignore_priority=DepPriority.MEDIUM):