From d8248bfc424ba70ab4a524e3a232d80eb27ed094 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 10 Apr 2008 09:11:56 +0000 Subject: [PATCH] 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 --- bin/emerge | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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): -- 2.26.2