Make depclean account for old-style virtuals so that it doesn't remove the providers...
authorZac Medico <zmedico@gentoo.org>
Mon, 31 Jul 2006 18:16:24 +0000 (18:16 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 31 Jul 2006 18:16:24 +0000 (18:16 -0000)
svn path=/main/branches/2.1/; revision=4067

bin/emerge

index 1b5de9765d9631b525450b32bb0a5a82e76d0fbc..1f86800d185308b5f56451756c01948e3ba737f9 100755 (executable)
@@ -3343,7 +3343,13 @@ elif "depclean"==myaction:
        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)
+               try:
+                       # include any old-style virtual providers that may exist
+                       sys_world_unversioned.update(portage.settings.getvirtuals()[mycp])
+               except KeyError:
+                       pass
+               sys_world_unversioned.add(mycp)
 
        cleanlist=[]
        for x in myvarlist: