Make depclean account for old-style virtuals so that it doesn't remove the providers.
authorZac Medico <zmedico@gentoo.org>
Sat, 22 Jul 2006 00:33:15 +0000 (00:33 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 22 Jul 2006 00:33:15 +0000 (00:33 -0000)
svn path=/main/trunk/; revision=3986

bin/emerge

index 90ec7e4358db3512731ee607fe3d7457f7b95783..7406608814d4fff0bdee1f1219ca01406a246f38 100755 (executable)
@@ -3257,7 +3257,14 @@ def action_depclean(settings, trees, ldpath_mtimes,
        sys_world_unversioned = set()
        from itertools import chain
        for x in chain(syslist, worldlist):
-               sys_world_unversioned.add(portage.dep_getkey(x))
+               mycp = portage.dep_getkey(x)
+               if mycp in settings.getvirtuals():
+                       providers = []
+                       for provider in settings.getvirtuals()[mycp]:
+                               if vartree.dbapi.match(provider):
+                                       providers.append(provider)
+                       sys_world_unversioned.update(providers)
+               sys_world_unversioned.add(mycp)
 
        cleanlist=[]
        for x in myvarlist: