Remove deprecated key_expand function and config.load_infodir method.
authorZac Medico <zmedico@gentoo.org>
Fri, 19 Feb 2010 22:01:44 +0000 (22:01 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 19 Feb 2010 22:01:44 +0000 (22:01 -0000)
svn path=/main/trunk/; revision=15402

pym/portage/__init__.py

index 3785371908b8b236bf70e1525cd902e2ee2a2f31..a52e2ed4efb2a79c31c1ded2f9b6d4a8216664f1 100644 (file)
@@ -2441,11 +2441,6 @@ class config(object):
                                self.useforce_list, incremental=True))
                self.regenerate(use_cache=use_cache)
 
-       def load_infodir(self,infodir):
-               warnings.warn("portage.config.load_infodir() is deprecated",
-                       DeprecationWarning)
-               return 1
-
        class _lazy_vars(object):
 
                __slots__ = ('built_use', 'settings', 'values')
@@ -8478,32 +8473,6 @@ def cpv_getkey(mycpv):
 
 getCPFromCPV = cpv_getkey
 
-def key_expand(mykey, mydb=None, use_cache=1, settings=None):
-       """This is deprecated because it just returns the first match instead of
-       raising AmbiguousPackageName like cpv_expand does."""
-       warnings.warn("portage.key_expand() is deprecated", DeprecationWarning)
-       mysplit=mykey.split("/")
-       if settings is None:
-               settings = globals()["settings"]
-       virts = settings.getvirtuals("/")
-       virts_p = settings.get_virts_p("/")
-       if len(mysplit)==1:
-               if hasattr(mydb, "cp_list"):
-                       for x in mydb.categories:
-                               if mydb.cp_list(x+"/"+mykey,use_cache=use_cache):
-                                       return dep.Atom(x + "/" + mykey)
-                       if mykey in virts_p:
-                               return(virts_p[mykey][0])
-               return dep.Atom("null/" + mykey)
-       elif mydb:
-               if hasattr(mydb, "cp_list"):
-                       if not mydb.cp_list(mykey, use_cache=use_cache) and \
-                               virts and mykey in virts:
-                               return virts[mykey][0]
-               if not isinstance(mykey, dep.Atom):
-                       mykey = dep.Atom(mykey)
-               return mykey
-
 def cpv_expand(mycpv, mydb=None, use_cache=1, settings=None):
        """Given a string (packagename or virtual) expand it into a valid
        cat/package string. Virtuals use the mydb to determine which provided