summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-06 23:07:01 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-06 23:07:01 +0000
commita39124fb6af38c7bd00f09556490fe8f15e8f84c (patch)
treef17d23acbbc40e48fcba7388f8ea6f28fe4425ec /bin
parent36f13a81f93d1d5bf055f78acc2be9f3b70bf122 (diff)
downloadportage-a39124fb6af38c7bd00f09556490fe8f15e8f84c.tar.gz
portage-a39124fb6af38c7bd00f09556490fe8f15e8f84c.tar.bz2
portage-a39124fb6af38c7bd00f09556490fe8f15e8f84c.zip
When depgraph updates preferences for old-style virtuals, also update them in the global config so that they are consistent everywhere. Optimize config.setinst() to minimize the work done. (trunk r7185)
svn path=/main/branches/2.1.2/; revision=7186
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/emerge b/bin/emerge
index 011b0469a..9f1c34472 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1745,9 +1745,14 @@ class depgraph:
if p_status == "merge":
# Update old-style virtuals if this package provides any.
# These are needed for dep_virtual calls inside dep_check.
- p_db = self.trees[p_root][self.pkg_tree_map[p_type]].dbapi
+ p_db = self.mydbapi[p_root] # contains cached metadata
try:
self.pkgsettings[p_root].setinst(p_key, p_db)
+ # For consistency, also update the global virtuals.
+ settings = self.roots[p_root].settings
+ settings.unlock()
+ settings.setinst(p_key, p_db)
+ settings.lock()
except portage_exception.InvalidDependString, e:
provide = p_db.aux_get(p_key, ["PROVIDE"])[0]
show_invalid_depstring_notice(myparent, provide, str(e))