summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-29 20:22:33 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-29 20:22:33 +0000
commit008dee06d8a380d8cdc0d91ef255d002fea4e462 (patch)
tree6f30e2c41dea85cb38e9bd8ce2a9e89da2b131e3
parent7732edee1af982c52d61f2fd972536e405b8933e (diff)
downloadportage-008dee06d8a380d8cdc0d91ef255d002fea4e462.tar.gz
portage-008dee06d8a380d8cdc0d91ef255d002fea4e462.tar.bz2
portage-008dee06d8a380d8cdc0d91ef255d002fea4e462.zip
Add a sanity check inside depgraph._add_pkg() to ensure that the dependencies
of the same package are never processed more than once. svn path=/main/trunk/; revision=12122
-rw-r--r--pym/_emerge/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index e82269dd4..ef5ba6a4e 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -4552,6 +4552,9 @@ class depgraph(object):
#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
@@ -4704,7 +4707,8 @@ class depgraph(object):
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):