Remove deprecated portage.dep_virtual
authorSebastian Luther <SebastianLuther@gmx.de>
Wed, 11 Aug 2010 05:56:31 +0000 (07:56 +0200)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Aug 2010 07:47:22 +0000 (00:47 -0700)
pym/portage/__init__.py
pym/portage/_deprecated.py

index f9c9eb7187e731605905c6251061820f6ff4a430..a210535d3529344f2b9a18384ecbb1fba48bb907 100644 (file)
@@ -131,7 +131,7 @@ try:
                        'cpv_getkey@getCPFromCPV,endversion_keys,' + \
                        'suffix_value@endversion,pkgcmp,pkgsplit,vercmp,ververify',
                'portage.xpak',
-               'portage._deprecated:dep_virtual,' + \
+               'portage._deprecated:' + \
                        'getvirtuals,pkgmerge',
        )
 
index ea40c2dde553e1f4faa22914ff91a95e0c1497f4..ef3061ceff2d4586b71d50bed36af4ba4f8fa09d 100644 (file)
@@ -15,34 +15,6 @@ from portage.localization import _
 from portage.manifest import Manifest
 from portage.util import writemsg, writemsg_stdout
 
-def dep_virtual(mysplit, mysettings):
-       "Does virtual dependency conversion"
-       warnings.warn("portage.dep_virtual() is deprecated",
-               DeprecationWarning, stacklevel=2)
-       newsplit=[]
-       myvirtuals = mysettings.getvirtuals()
-       for x in mysplit:
-               if isinstance(x, list):
-                       newsplit.append(dep_virtual(x, mysettings))
-               else:
-                       mykey=dep_getkey(x)
-                       mychoices = myvirtuals.get(mykey, None)
-                       if mychoices:
-                               if len(mychoices) == 1:
-                                       a = x.replace(mykey, dep_getkey(mychoices[0]), 1)
-                               else:
-                                       if x[0]=="!":
-                                               # blocker needs "and" not "or(||)".
-                                               a=[]
-                                       else:
-                                               a=['||']
-                                       for y in mychoices:
-                                               a.append(x.replace(mykey, dep_getkey(y), 1))
-                               newsplit.append(a)
-                       else:
-                               newsplit.append(x)
-       return newsplit
-
 def getvirtuals(myroot):
        """
        Calls portage.settings.getvirtuals().