public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r12123 - main/branches/2.1.6/pym/_emerge
@ 2008-11-29 20:24 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-11-29 20:24 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-11-29 20:24:31 +0000 (Sat, 29 Nov 2008)
New Revision: 12123

Modified:
   main/branches/2.1.6/pym/_emerge/__init__.py
Log:
Add a sanity check inside depgraph._add_pkg() to ensure that the dependencies
of the same package are never processed more than once. (trunk r12122)


Modified: main/branches/2.1.6/pym/_emerge/__init__.py
===================================================================
--- main/branches/2.1.6/pym/_emerge/__init__.py	2008-11-29 20:22:33 UTC (rev 12122)
+++ main/branches/2.1.6/pym/_emerge/__init__.py	2008-11-29 20:24:31 UTC (rev 12123)
@@ -4536,6 +4536,9 @@
 		#IUSE-aware emerge -> USE DEP aware depgraph
 		#"no downgrade" emerge
 		"""
+		# Ensure that the dependencies of the same package
+		# are never processed more than once.
+		previously_added = pkg in self.digraph
 
 		# select the correct /var database that we'll be checking against
 		vardbapi = self.trees[pkg.root]["vartree"].dbapi
@@ -4688,7 +4691,8 @@
 		if args:
 			depth = 0
 		pkg.depth = depth
-		dep_stack.append(pkg)
+		if not previously_added:
+			dep_stack.append(pkg)
 		return 1
 
 	def _add_pkg_deps(self, pkg, allow_unsatisfied=False):




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

only message in thread, other threads:[~2008-11-29 20:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-29 20:24 [gentoo-commits] portage r12123 - main/branches/2.1.6/pym/_emerge 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