diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-07-08 04:14:35 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-07-08 04:14:35 +0000 |
commit | f2744900a1556a3fbcdce1f98928a422c1e4c330 (patch) | |
tree | e62f9f934080e935958b361fec6d9f1bb7741cc6 | |
parent | 5c22fec8294f797b8039aa4bf0ced26e0fb1c5c4 (diff) | |
download | portage-f2744900a1556a3fbcdce1f98928a422c1e4c330.tar.gz portage-f2744900a1556a3fbcdce1f98928a422c1e4c330.tar.bz2 portage-f2744900a1556a3fbcdce1f98928a422c1e4c330.zip |
Allow system virtuals to be pruned from the world file in cases where the matched package is the only provider of that virtual. (trunk r7197)
svn path=/main/branches/2.1.2/; revision=7198
-rwxr-xr-x | bin/emerge | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/emerge b/bin/emerge index 30541ef6d..f10f56c95 100755 --- a/bin/emerge +++ b/bin/emerge @@ -726,12 +726,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): |