diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-07-08 04:09:51 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-07-08 04:09:51 +0000 |
commit | d3a3b04bacbf42d945820adb1b5005bff59b02f2 (patch) | |
tree | 13e48975fff7ee1f192e5edfa055309fcd658d1c | |
parent | 70b86e2116cfe6747d7eac2bba2f201d043039fa (diff) | |
download | portage-d3a3b04bacbf42d945820adb1b5005bff59b02f2.tar.gz portage-d3a3b04bacbf42d945820adb1b5005bff59b02f2.tar.bz2 portage-d3a3b04bacbf42d945820adb1b5005bff59b02f2.zip |
Allow system virtuals to be pruned from the world file in cases where the matched package is the only provider of that virtual.
svn path=/main/trunk/; revision=7197
-rw-r--r-- | pym/emerge/__init__.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 9eaacec1f..e48e6c085 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -725,12 +725,16 @@ def create_world_atom(pkg_key, metadata, args_set, sets, portdb): # Unlike world atoms, system atoms are not greedy for slots, so they # can't be safely excluded from world if they are slotted. system_atom = sets["system"].findAtomForPackage(pkg_key, metadata) - if system_atom and \ - not portage.dep_getkey(system_atom).startswith("virtual/"): + if system_atom: + if not portage.dep_getkey(system_atom).startswith("virtual/"): + return None # System virtuals aren't safe to exclude from world since they can # match multiple old-style virtuals but only one of them will be # pulled in by update or depclean. - return None + providers = portdb.mysettings.getvirtuals().get( + portage.dep_getkey(system_atom)) + if providers and len(providers) == 1 and providers[0] == cp: + return None return new_world_atom def filter_iuse_defaults(iuse): |