public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r12587 - main/trunk/pym/portage
@ 2009-02-05 23:02 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-02-05 23:02 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2009-02-05 23:02:36 +0000 (Thu, 05 Feb 2009)
New Revision: 12587

Modified:
   main/trunk/pym/portage/__init__.py
Log:
Fix digraph.clone() to properly clone priority lists.


Modified: main/trunk/pym/portage/__init__.py
===================================================================
--- main/trunk/pym/portage/__init__.py	2009-02-05 20:40:24 UTC (rev 12586)
+++ main/trunk/pym/portage/__init__.py	2009-02-05 23:02:36 UTC (rev 12587)
@@ -561,8 +561,14 @@
 	def clone(self):
 		clone = digraph()
 		clone.nodes = {}
-		for k, v in self.nodes.iteritems():
-			clone.nodes[k] = (v[0].copy(), v[1].copy(), v[2])
+		for children, parents, node in self.nodes.itervalues():
+			children_clone = {}
+			for child, priorities in children.iteritems():
+				children_clone[child] = priorities[:]
+			parents_clone = {}
+			for parent, priorities in parents.iteritems():
+				parents_clone[parent] = priorities[:]
+			clone.nodes[node] = (children_clone, parents_clone, node)
 		clone.order = self.order[:]
 		return clone
 




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-05 23:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-05 23:02 [gentoo-commits] portage r12587 - main/trunk/pym/portage Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox