From acf6947f80b6c84ad1fc258ba5db5df2cf6d0b30 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 10 Jul 2007 17:28:04 +0000 Subject: For bug #184806, account for the fact the metadata is not cached for slot_collision_nodes. (trunk r7214) svn path=/main/branches/2.1.2/; revision=7215 --- bin/emerge | 14 ++++++++++---- pym/portage.py | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bin/emerge b/bin/emerge index b0310c2ad..451aa53b1 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1756,6 +1756,9 @@ class depgraph: # Update old-style virtuals if this package provides any. # These are needed for dep_virtual calls inside dep_check. p_db = self.mydbapi[p_root] # contains cached metadata + if myparent in self._slot_collision_nodes: + # The metadata isn't cached due to the slot collision. + p_db = self.trees[p_root][self.pkg_tree_map[p_type]].dbapi try: self.pkgsettings[p_root].setinst(p_key, p_db) # For consistency, also update the global virtuals. @@ -2718,6 +2721,7 @@ class depgraph: for mylist_index in xrange(len(mylist)): x, depth, ordered = mylist[mylist_index] + pkg_node = tuple(x) pkg_type = x[0] myroot = x[1] pkg_key = x[2] @@ -2749,14 +2753,16 @@ class depgraph: addl += bad(" (is blocking %s)") % block_parents blockers.append(addl) else: - mydbapi = self.trees[myroot][self.pkg_tree_map[pkg_type]].dbapi pkg_status = x[3] pkg_merge = ordered and pkg_status != "nomerge" binary_package = pkg_type != "ebuild" + if pkg_node in self._slot_collision_nodes: + # The metadata isn't cached due to the slot collision. + mydbapi = self.trees[myroot][self.pkg_tree_map[pkg_type]].dbapi + else: + mydbapi = self.mydbapi[myroot] # contains cached metadata metadata = dict(izip(self._mydbapi_keys, - self.mydbapi[myroot].aux_get( - pkg_key, self._mydbapi_keys))) - mydbapi = self.mydbapi[myroot] # use the cached metadata + mydbapi.aux_get(pkg_key, self._mydbapi_keys))) if pkg_key not in self.useFlags[myroot]: """If this is a --resume then the USE flags need to be fetched from the appropriate locations here.""" diff --git a/pym/portage.py b/pym/portage.py index 5c8731c7d..57d58e5b8 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1,5 +1,5 @@ -repo_name = open(repo_name_path# portage.py -- core Portage functionality -# Copyright 1998-2004 Gentoo Foundation +# portage.py -- core Portage functionality +# Copyright 1998-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ -- cgit v1.2.3-1-g7c22