summaryrefslogtreecommitdiffstats
path: root/pym/_emerge
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-20 08:18:48 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-20 08:18:48 +0000
commited6c09b010c621b1edaeb8a234952aafcfe34c99 (patch)
tree7a9a8567db116b501bccc98c7bbda9f5a28d5d11 /pym/_emerge
parent8dffd77c86a22e0d574b0c3d15cefb7fb376ca33 (diff)
downloadportage-ed6c09b010c621b1edaeb8a234952aafcfe34c99.tar.gz
portage-ed6c09b010c621b1edaeb8a234952aafcfe34c99.tar.bz2
portage-ed6c09b010c621b1edaeb8a234952aafcfe34c99.zip
Allow the depgraph to add old-style virtual providers but
prefer any pre-existing providers over new ones that are added. svn path=/main/trunk/; revision=8187
Diffstat (limited to 'pym/_emerge')
-rw-r--r--pym/_emerge/__init__.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 000e74d9e..9aaa7ee7c 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -1339,6 +1339,22 @@ class depgraph(object):
self.digraph.addnode(jbigkey, myparent,
priority=priority)
+ if mytype != "installed":
+ # Allow this package to satisfy old-style virtuals in case it
+ # doesn't already. Any pre-existing providers will be preferred
+ # over this one.
+ try:
+ pkgsettings.setinst(mykey, metadata)
+ # For consistency, also update the global virtuals.
+ settings = self.roots[myroot].settings
+ settings.unlock()
+ settings.setinst(mykey, metadata)
+ settings.lock()
+ except portage.exception.InvalidDependString, e:
+ show_invalid_depstring_notice(jbigkey, metadata["PROVIDE"], str(e))
+ del e
+ return 0
+
if arg:
self._set_nodes.add(jbigkey)