From 9e1f59470309dc3c6c81aebbe2089c40637182a1 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 2 Mar 2010 20:46:13 +0000 Subject: [PATCH] Remove deprecated key_expand function and config.load_infodir method. (trunk r15402) svn path=/main/branches/2.1.7/; revision=15624 --- pym/portage/__init__.py | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 65674b963..2cd41f26e 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -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') @@ -8475,32 +8470,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 -- 2.26.2