1 |
Author: zmedico |
2 |
Date: 2010-02-22 01:49:55 +0000 (Mon, 22 Feb 2010) |
3 |
New Revision: 15420 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/__init__.py |
7 |
main/trunk/pym/portage/glsa.py |
8 |
Log: |
9 |
Don't import the portage.dbapi.dbapi class as portage.dbapi anymore, since |
10 |
it results in a strange namespace collision (portage.dbapi is both a class |
11 |
and a module). Hopefully this won't break any api consumers since it's a pure |
12 |
virtual class anyway. |
13 |
|
14 |
|
15 |
Modified: main/trunk/pym/portage/__init__.py |
16 |
=================================================================== |
17 |
--- main/trunk/pym/portage/__init__.py 2010-02-22 01:41:25 UTC (rev 15419) |
18 |
+++ main/trunk/pym/portage/__init__.py 2010-02-22 01:49:55 UTC (rev 15420) |
19 |
@@ -83,7 +83,7 @@ |
20 |
'portage.data', |
21 |
'portage.data:lchown,ostype,portage_gid,portage_uid,secpass,' + \ |
22 |
'uid,userland,userpriv_groups,wheelgid', |
23 |
- 'portage.dbapi:dbapi', |
24 |
+ 'portage.dbapi', |
25 |
'portage.dbapi.bintree:bindbapi,binarytree', |
26 |
'portage.dbapi.porttree:close_portdbapi_caches,FetchlistDict,' + \ |
27 |
'portagetree,portdbapi', |
28 |
@@ -2102,9 +2102,10 @@ |
29 |
|
30 |
#getting categories from an external file now |
31 |
categories = [grabfile(os.path.join(x, "categories")) for x in locations] |
32 |
+ category_re = dbapi.dbapi._category_re |
33 |
self.categories = tuple(sorted( |
34 |
x for x in stack_lists(categories, incremental=1) |
35 |
- if dbapi._category_re.match(x) is not None)) |
36 |
+ if category_re.match(x) is not None)) |
37 |
del categories |
38 |
|
39 |
archlist = [grabfile(os.path.join(x, "arch.list")) for x in locations] |
40 |
|
41 |
Modified: main/trunk/pym/portage/glsa.py |
42 |
=================================================================== |
43 |
--- main/trunk/pym/portage/glsa.py 2010-02-22 01:41:25 UTC (rev 15419) |
44 |
+++ main/trunk/pym/portage/glsa.py 2010-02-22 01:49:55 UTC (rev 15420) |
45 |
@@ -268,12 +268,12 @@ |
46 |
|
47 |
def match(atom, dbapi, match_type="default"): |
48 |
""" |
49 |
- wrapper that calls revisionMatch() or portage.dbapi.match() depending on |
50 |
+ wrapper that calls revisionMatch() or portage.dbapi.dbapi.match() depending on |
51 |
the given atom. |
52 |
|
53 |
@type atom: string |
54 |
@param atom: a <~ or >~ atom or a normal portage atom that contains the atom to match against |
55 |
- @type dbapi: portage.dbapi |
56 |
+ @type dbapi: portage.dbapi.dbapi |
57 |
@param dbapi: one of the portage databases to use as information source |
58 |
@type match_type: string |
59 |
@param match_type: if != "default" passed as first argument to dbapi.xmatch |
60 |
@@ -297,7 +297,7 @@ |
61 |
|
62 |
@type revisionAtom: string |
63 |
@param revisionAtom: a <~ or >~ atom that contains the atom to match against |
64 |
- @type dbapi: portage.dbapi |
65 |
+ @type dbapi: portage.dbapi.dbapi |
66 |
@param dbapi: one of the portage databases to use as information source |
67 |
@type match_type: string |
68 |
@param match_type: if != "default" passed as first argument to portdb.xmatch |