summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-05 10:30:43 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-05 10:30:43 +0000
commit77a4aef3abc483d4dc1f2e26d7d665e6849a4804 (patch)
treece8c8da211f0fa4cc83a7f8b2adf6da350a1ab26
parent66056d0057e7e7b9843330ce8fd31ac87ea3dd55 (diff)
downloadportage-77a4aef3abc483d4dc1f2e26d7d665e6849a4804.tar.gz
portage-77a4aef3abc483d4dc1f2e26d7d665e6849a4804.tar.bz2
portage-77a4aef3abc483d4dc1f2e26d7d665e6849a4804.zip
Fix the depgraph package selection cache to update the "existing node"
state of packages if they've been added to the graph since the last call. svn path=/main/trunk/; revision=9717
-rw-r--r--pym/_emerge/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index a93997fc2..bc8cbd205 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -2484,6 +2484,14 @@ class depgraph(object):
cache_key = (root, atom, onlydeps)
ret = self._highest_pkg_cache.get(cache_key)
if ret is not None:
+ pkg, existing = ret
+ if pkg and not existing:
+ existing = self._slot_pkg_map[root].get(pkg.slot_atom)
+ if existing and existing == pkg:
+ # Update the cache to reflect that the
+ # package has been added to the graph.
+ ret = pkg, pkg
+ self._highest_pkg_cache[cache_key] = ret
return ret
ret = self._select_pkg_highest_available_imp(root, atom, onlydeps=onlydeps)
self._highest_pkg_cache[cache_key] = ret