1 |
Author: grobian |
2 |
Date: 2009-09-05 10:25:30 +0000 (Sat, 05 Sep 2009) |
3 |
New Revision: 14188 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/_emerge/BlockerCache.py |
7 |
main/trunk/pym/_emerge/actions.py |
8 |
main/trunk/pym/portage/__init__.py |
9 |
main/trunk/pym/portage/dbapi/bintree.py |
10 |
main/trunk/pym/portage/dbapi/vartree.py |
11 |
main/trunk/pym/portage/glsa.py |
12 |
Log: |
13 |
consistently use CACHE_PATH with target_root, this commit needs a separate soon to be done commit of pym/portage/const.py to work correctly |
14 |
|
15 |
Modified: main/trunk/pym/_emerge/BlockerCache.py |
16 |
=================================================================== |
17 |
--- main/trunk/pym/_emerge/BlockerCache.py 2009-09-05 10:00:22 UTC (rev 14187) |
18 |
+++ main/trunk/pym/_emerge/BlockerCache.py 2009-09-05 10:25:30 UTC (rev 14188) |
19 |
@@ -37,7 +37,7 @@ |
20 |
self._vardb = vardb |
21 |
self._virtuals = vardb.settings.getvirtuals() |
22 |
self._cache_filename = os.path.join(myroot, |
23 |
- portage.CACHE_PATH.lstrip(os.path.sep), "vdb_blockers.pickle") |
24 |
+ portage.CACHE_PATH, "vdb_blockers.pickle") |
25 |
self._cache_version = "1" |
26 |
self._cache_data = None |
27 |
self._modified = set() |
28 |
|
29 |
Modified: main/trunk/pym/_emerge/actions.py |
30 |
=================================================================== |
31 |
--- main/trunk/pym/_emerge/actions.py 2009-09-05 10:00:22 UTC (rev 14187) |
32 |
+++ main/trunk/pym/_emerge/actions.py 2009-09-05 10:25:30 UTC (rev 14188) |
33 |
@@ -2594,7 +2594,7 @@ |
34 |
settings = trees[myroot]["vartree"].settings |
35 |
break |
36 |
|
37 |
- mtimedbfile = os.path.join("/", portage.CACHE_PATH.lstrip(os.path.sep), "mtimedb") |
38 |
+ mtimedbfile = os.path.join(os.path.sep, settings['ROOT'], portage.CACHE_PATH, "mtimedb") |
39 |
mtimedb = portage.MtimeDB(mtimedbfile) |
40 |
portage.output._init(config_root=settings['PORTAGE_CONFIGROOT']) |
41 |
return settings, trees, mtimedb |
42 |
|
43 |
Modified: main/trunk/pym/portage/__init__.py |
44 |
=================================================================== |
45 |
--- main/trunk/pym/portage/__init__.py 2009-09-05 10:00:22 UTC (rev 14187) |
46 |
+++ main/trunk/pym/portage/__init__.py 2009-09-05 10:25:30 UTC (rev 14188) |
47 |
@@ -2198,12 +2198,12 @@ |
48 |
if not os.access(self["ROOT"], os.W_OK): |
49 |
return |
50 |
|
51 |
- # gid, mode, mask, preserve_perms |
52 |
+ # gid, mode, mask, preserve_perms |
53 |
dir_mode_map = { |
54 |
- "tmp" : ( -1, 01777, 0, True), |
55 |
- "var/tmp" : ( -1, 01777, 0, True), |
56 |
- PRIVATE_PATH : ( portage_gid, 02750, 02, False), |
57 |
- CACHE_PATH.lstrip(os.path.sep) : (portage_gid, 0755, 02, False) |
58 |
+ "tmp" : ( -1, 01777, 0, True), |
59 |
+ "var/tmp" : ( -1, 01777, 0, True), |
60 |
+ PRIVATE_PATH : (portage_gid, 02750, 02, False), |
61 |
+ CACHE_PATH : (portage_gid, 0755, 02, False) |
62 |
} |
63 |
|
64 |
for mypath, (gid, mode, modemask, preserve_perms) \ |
65 |
@@ -8811,8 +8811,8 @@ |
66 |
def _get_target(self): |
67 |
global mtimedb, mtimedbfile, _mtimedb_initialized |
68 |
if not _mtimedb_initialized: |
69 |
- mtimedbfile = os.path.join("/", |
70 |
- CACHE_PATH.lstrip(os.path.sep), "mtimedb") |
71 |
+ mtimedbfile = os.path.join(os.path.sep, |
72 |
+ CACHE_PATH, "mtimedb") |
73 |
mtimedb = MtimeDB(mtimedbfile) |
74 |
_mtimedb_initialized = True |
75 |
name = object.__getattribute__(self, '_name') |
76 |
|
77 |
Modified: main/trunk/pym/portage/dbapi/bintree.py |
78 |
=================================================================== |
79 |
--- main/trunk/pym/portage/dbapi/bintree.py 2009-09-05 10:00:22 UTC (rev 14187) |
80 |
+++ main/trunk/pym/portage/dbapi/bintree.py 2009-09-05 10:25:30 UTC (rev 14188) |
81 |
@@ -660,7 +660,7 @@ |
82 |
from portage.const import CACHE_PATH |
83 |
from urlparse import urlparse |
84 |
urldata = urlparse(base_url) |
85 |
- pkgindex_file = os.path.join(CACHE_PATH, "binhost", |
86 |
+ pkgindex_file = os.path.join(self.settings["ROOT"], CACHE_PATH, "binhost", |
87 |
urldata[1] + urldata[2], "Packages") |
88 |
pkgindex = self._new_pkgindex() |
89 |
try: |
90 |
|
91 |
Modified: main/trunk/pym/portage/dbapi/vartree.py |
92 |
=================================================================== |
93 |
--- main/trunk/pym/portage/dbapi/vartree.py 2009-09-05 10:00:22 UTC (rev 14187) |
94 |
+++ main/trunk/pym/portage/dbapi/vartree.py 2009-09-05 10:25:30 UTC (rev 14188) |
95 |
@@ -814,9 +814,9 @@ |
96 |
"repository", "RESTRICT" , "SLOT", "USE"]) |
97 |
self._aux_cache_obj = None |
98 |
self._aux_cache_filename = os.path.join(self.root, |
99 |
- CACHE_PATH.lstrip(os.path.sep), "vdb_metadata.pickle") |
100 |
+ CACHE_PATH, "vdb_metadata.pickle") |
101 |
self._counter_path = os.path.join(root, |
102 |
- CACHE_PATH.lstrip(os.path.sep), "counter") |
103 |
+ CACHE_PATH, "counter") |
104 |
|
105 |
try: |
106 |
self.plib_registry = PreservedLibsRegistry(self.root, |
107 |
|
108 |
Modified: main/trunk/pym/portage/glsa.py |
109 |
=================================================================== |
110 |
--- main/trunk/pym/portage/glsa.py 2009-09-05 10:00:22 UTC (rev 14187) |
111 |
+++ main/trunk/pym/portage/glsa.py 2009-09-05 10:25:30 UTC (rev 14188) |
112 |
@@ -33,7 +33,7 @@ |
113 |
@rtype: list |
114 |
@return: list of glsa IDs |
115 |
""" |
116 |
- return grabfile(os.path.join(os.sep, settings["ROOT"], CACHE_PATH.lstrip(os.sep), "glsa")) |
117 |
+ return grabfile(os.path.join(os.sep, settings["ROOT"], CACHE_PATH, "glsa")) |
118 |
|
119 |
|
120 |
# TODO: use the textwrap module instead |
121 |
@@ -655,7 +655,7 @@ |
122 |
if not self.isApplied(): |
123 |
checkfile = codecs.open( |
124 |
_unicode_encode(os.path.join(os.sep, self.config["ROOT"], |
125 |
- CACHE_PATH.lstrip(os.sep), "glsa"), |
126 |
+ CACHE_PATH, "glsa"), |
127 |
encoding=_encodings['fs'], errors='strict'), |
128 |
mode='a+', encoding=_encodings['content'], errors='strict') |
129 |
checkfile.write(self.nr+"\n") |