Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r15402 - main/trunk/pym/portage
Date: Fri, 19 Feb 2010 22:01:52
Message-Id: E1Niauv-0007nF-1z@stork.gentoo.org
1 Author: zmedico
2 Date: 2010-02-19 22:01:44 +0000 (Fri, 19 Feb 2010)
3 New Revision: 15402
4
5 Modified:
6 main/trunk/pym/portage/__init__.py
7 Log:
8 Remove deprecated key_expand function and config.load_infodir method.
9
10
11 Modified: main/trunk/pym/portage/__init__.py
12 ===================================================================
13 --- main/trunk/pym/portage/__init__.py 2010-02-19 21:54:54 UTC (rev 15401)
14 +++ main/trunk/pym/portage/__init__.py 2010-02-19 22:01:44 UTC (rev 15402)
15 @@ -2441,11 +2441,6 @@
16 self.useforce_list, incremental=True))
17 self.regenerate(use_cache=use_cache)
18
19 - def load_infodir(self,infodir):
20 - warnings.warn("portage.config.load_infodir() is deprecated",
21 - DeprecationWarning)
22 - return 1
23 -
24 class _lazy_vars(object):
25
26 __slots__ = ('built_use', 'settings', 'values')
27 @@ -8478,32 +8473,6 @@
28
29 getCPFromCPV = cpv_getkey
30
31 -def key_expand(mykey, mydb=None, use_cache=1, settings=None):
32 - """This is deprecated because it just returns the first match instead of
33 - raising AmbiguousPackageName like cpv_expand does."""
34 - warnings.warn("portage.key_expand() is deprecated", DeprecationWarning)
35 - mysplit=mykey.split("/")
36 - if settings is None:
37 - settings = globals()["settings"]
38 - virts = settings.getvirtuals("/")
39 - virts_p = settings.get_virts_p("/")
40 - if len(mysplit)==1:
41 - if hasattr(mydb, "cp_list"):
42 - for x in mydb.categories:
43 - if mydb.cp_list(x+"/"+mykey,use_cache=use_cache):
44 - return dep.Atom(x + "/" + mykey)
45 - if mykey in virts_p:
46 - return(virts_p[mykey][0])
47 - return dep.Atom("null/" + mykey)
48 - elif mydb:
49 - if hasattr(mydb, "cp_list"):
50 - if not mydb.cp_list(mykey, use_cache=use_cache) and \
51 - virts and mykey in virts:
52 - return virts[mykey][0]
53 - if not isinstance(mykey, dep.Atom):
54 - mykey = dep.Atom(mykey)
55 - return mykey
56 -
57 def cpv_expand(mycpv, mydb=None, use_cache=1, settings=None):
58 """Given a string (packagename or virtual) expand it into a valid
59 cat/package string. Virtuals use the mydb to determine which provided