1 |
Author: grobian |
2 |
Date: 2008-08-24 13:21:34 +0000 (Sun, 24 Aug 2008) |
3 |
New Revision: 11462 |
4 |
|
5 |
Modified: |
6 |
main/branches/prefix/bin/ebuild.sh |
7 |
main/branches/prefix/bin/isolated-functions.sh |
8 |
main/branches/prefix/bin/portageq |
9 |
main/branches/prefix/doc/package/ebuild/eapi/2.docbook |
10 |
main/branches/prefix/man/emerge.1 |
11 |
main/branches/prefix/pym/_emerge/__init__.py |
12 |
main/branches/prefix/pym/portage/__init__.py |
13 |
main/branches/prefix/pym/portage/const.py |
14 |
main/branches/prefix/pym/portage/dbapi/vartree.py |
15 |
Log: |
16 |
Merged from trunk -r11445:11446 |
17 |
|
18 |
| 11446 | Fix typo in "directory" spelling. Thanks to Ofer Wald in bug | |
19 |
| zmedico | #219957. | |
20 |
|
21 |
Merged from trunk -r11448:11454 |
22 |
|
23 |
| 11449 | For consistency, show [0] in the repo display instead of | |
24 |
| zmedico | suppressing it. Now the repo display and [0] will only be | |
25 |
| | suppressed when [0] is all that would show for every | |
26 |
| | package. Thanks to Joe Peterson <lavajoe@g.o> for the | |
27 |
| | suggestion. | |
28 |
|
29 |
| 11450 | Use shlex.split() to split CONFIG_PROTECT and | |
30 |
| zmedico | CONFIG_PROTECT_MASK. | |
31 |
|
32 |
| 11451 | Update ROOT docs wrt make.conf since it can now be set there | |
33 |
| zmedico | regardless of PORTAGE_CONFIGROOT setting. | |
34 |
|
35 |
| 11452 | Fix isprotected() call in dblink._collision_protect() to | |
36 |
| zmedico | properly account for $ROOT. | |
37 |
|
38 |
| 11453 | Add a new is_protected command which queries whether or not | |
39 |
| zmedico | CONFIG_PROTECT applies to a given file, using logic | |
40 |
| | identical to the merge code. | |
41 |
|
42 |
| 11454 | Add a new src_prepare phase function which is called | |
43 |
| zmedico | in-between src_unpack and src_configure (and bump EAPI to | |
44 |
| | 2_pre3). Thanks to Ciaran McCreesh for the suggestion. | |
45 |
|
46 |
|
47 |
Modified: main/branches/prefix/bin/ebuild.sh |
48 |
=================================================================== |
49 |
--- main/branches/prefix/bin/ebuild.sh 2008-08-24 13:14:29 UTC (rev 11461) |
50 |
+++ main/branches/prefix/bin/ebuild.sh 2008-08-24 13:21:34 UTC (rev 11462) |
51 |
@@ -735,7 +735,7 @@ |
52 |
fi |
53 |
|
54 |
if ! hasq keepwork $FEATURES; then |
55 |
- rm -f "$PORTAGE_BUILDDIR"/.{exit_status,logid,unpacked} \ |
56 |
+ rm -f "$PORTAGE_BUILDDIR"/.{exit_status,logid,unpacked,prepared} \ |
57 |
"$PORTAGE_BUILDDIR"/.{configured,compiled,tested,packaged} |
58 |
|
59 |
rm -rf "${PORTAGE_BUILDDIR}/build-info" |
60 |
@@ -841,6 +841,12 @@ |
61 |
trap SIGINT SIGQUIT |
62 |
} |
63 |
|
64 |
+abort_prepare() { |
65 |
+ abort_handler src_prepare $1 |
66 |
+ rm -f "$PORTAGE_BUILDDIR/.prepared" |
67 |
+ exit 1 |
68 |
+} |
69 |
+ |
70 |
abort_configure() { |
71 |
abort_handler src_configure $1 |
72 |
rm -f "$PORTAGE_BUILDDIR/.configured" |
73 |
@@ -865,6 +871,32 @@ |
74 |
exit 1 |
75 |
} |
76 |
|
77 |
+dyn_prepare() { |
78 |
+ |
79 |
+ if [[ $PORTAGE_BUILDDIR/.prepared -nt $WORKDIR ]] ; then |
80 |
+ vecho ">>> It appears that '$PF' is already prepared; skipping." |
81 |
+ vecho ">>> Remove '$PORTAGE_BUILDDIR/.prepared' to force prepare." |
82 |
+ return 0 |
83 |
+ fi |
84 |
+ |
85 |
+ local srcdir |
86 |
+ if [[ -d $S ]] ; then |
87 |
+ srcdir=$S |
88 |
+ else |
89 |
+ srcdir=$WORKDIR |
90 |
+ fi |
91 |
+ cd "$srcdir" |
92 |
+ |
93 |
+ trap abort_prepare SIGINT SIGQUIT |
94 |
+ |
95 |
+ ebuild_phase pre_src_prepare |
96 |
+ ebuild_phase src_prepare |
97 |
+ touch "$PORTAGE_BUILDDIR"/.prepared |
98 |
+ ebuild_phase post_src_prepare |
99 |
+ |
100 |
+ trap SIGINT SIGQUIT |
101 |
+} |
102 |
+ |
103 |
dyn_configure() { |
104 |
|
105 |
if [[ $PORTAGE_BUILDDIR/.configured -nt $WORKDIR ]] ; then |
106 |
@@ -1048,7 +1080,8 @@ |
107 |
echo " fetch : download source archive(s) and patches" |
108 |
echo " digest : create a manifest file for the package" |
109 |
echo " manifest : create a manifest file for the package" |
110 |
- echo " unpack : unpack/patch sources (auto-fetch if needed)" |
111 |
+ echo " unpack : unpack sources (auto-dependencies if needed)" |
112 |
+ echo " prepare : prepare sources (auto-dependencies if needed)" |
113 |
echo " configure : configure sources (auto-fetch/unpack if needed)" |
114 |
echo " compile : compile sources (auto-fetch/unpack/configure if needed)" |
115 |
echo " test : test package (auto-fetch/unpack/configure/compile if needed)" |
116 |
@@ -1397,7 +1430,7 @@ |
117 |
[ $# -ne 2 ] && die "expected exactly 2 args, got $#: $*" |
118 |
local eapi=$1 |
119 |
local phase_func=$2 |
120 |
- local default_phases="pkg_nofetch src_unpack src_configure |
121 |
+ local default_phases="pkg_nofetch src_unpack src_prepare src_configure |
122 |
src_compile src_install src_test" |
123 |
local x y default_func="" |
124 |
|
125 |
@@ -1450,6 +1483,7 @@ |
126 |
|
127 |
eapi0_pkg_nofetch () { _eapi0_pkg_nofetch "$@" ; } |
128 |
eapi0_src_unpack () { _eapi0_src_unpack "$@" ; } |
129 |
+ eapi0_src_prepare () { die "$FUNCNAME is not supported" ; } |
130 |
eapi0_src_configure () { die "$FUNCNAME is not supported" ; } |
131 |
eapi0_src_compile () { _eapi0_src_compile "$@" ; } |
132 |
eapi0_src_test () { _eapi0_src_test "$@" ; } |
133 |
@@ -1457,6 +1491,7 @@ |
134 |
|
135 |
eapi1_pkg_nofetch () { _eapi0_pkg_nofetch "$@" ; } |
136 |
eapi1_src_unpack () { _eapi0_src_unpack "$@" ; } |
137 |
+ eapi1_src_prepare () { die "$FUNCNAME is not supported" ; } |
138 |
eapi1_src_configure () { die "$FUNCNAME is not supported" ; } |
139 |
eapi1_src_compile () { _eapi1_src_compile "$@" ; } |
140 |
eapi1_src_test () { _eapi0_src_test "$@" ; } |
141 |
@@ -1464,6 +1499,7 @@ |
142 |
|
143 |
eapi2_pkg_nofetch () { _eapi0_pkg_nofetch "$@" ; } |
144 |
eapi2_src_unpack () { _eapi0_src_unpack "$@" ; } |
145 |
+ eapi2_src_prepare () { true ; } |
146 |
eapi2_src_configure () { _eapi2_src_configure "$@" ; } |
147 |
eapi2_src_compile () { _eapi2_src_compile "$@" ; } |
148 |
eapi2_src_test () { _eapi0_src_test "$@" ; } |
149 |
@@ -1959,7 +1995,7 @@ |
150 |
| bzip2 -c -f9 > "$PORTAGE_UPDATE_ENV" |
151 |
fi |
152 |
;; |
153 |
- unpack|configure|compile|test|clean|install) |
154 |
+ unpack|prepare|configure|compile|test|clean|install) |
155 |
if [[ ${SANDBOX_DISABLED:-0} = 0 ]] ; then |
156 |
export SANDBOX_ON="1" |
157 |
else |
158 |
|
159 |
Modified: main/branches/prefix/bin/isolated-functions.sh |
160 |
=================================================================== |
161 |
--- main/branches/prefix/bin/isolated-functions.sh 2008-08-24 13:14:29 UTC (rev 11461) |
162 |
+++ main/branches/prefix/bin/isolated-functions.sh 2008-08-24 13:21:34 UTC (rev 11462) |
163 |
@@ -532,7 +532,7 @@ |
164 |
|
165 |
if hasq --exclude-init-phases $* ; then |
166 |
unset S _E_DOCDESTTREE_ _E_EXEDESTTREE_ |
167 |
- unset -f pkg_nofetch src_unpack src_configure \ |
168 |
+ unset -f pkg_nofetch src_unpack src_prepare src_configure \ |
169 |
src_compile src_test src_install |
170 |
if [[ -n $PYTHONPATH ]] ; then |
171 |
export PYTHONPATH=${PYTHONPATH/${PORTAGE_PYM_PATH}:} |
172 |
@@ -558,7 +558,7 @@ |
173 |
# There's no need to bloat environment.bz2 with internally defined |
174 |
# functions and variables, so filter them out if possible. |
175 |
|
176 |
- for x in pkg_setup pkg_nofetch src_unpack src_configure \ |
177 |
+ for x in pkg_setup pkg_nofetch src_unpack src_prepare src_configure \ |
178 |
src_compile src_test src_install pkg_preinst pkg_postinst \ |
179 |
pkg_prerm pkg_postrm ; do |
180 |
unset -f {,_}default_$x {,_}eapi{0,1,2}_$x |
181 |
@@ -574,8 +574,8 @@ |
182 |
keepdir unpack strip_duplicate_slashes econf einstall \ |
183 |
dyn_setup dyn_unpack dyn_clean into insinto exeinto docinto \ |
184 |
insopts diropts exeopts libopts \ |
185 |
- abort_handler abort_configure abort_compile \ |
186 |
- abort_test abort_install dyn_configure \ |
187 |
+ abort_handler abort_prepare abort_configure abort_compile \ |
188 |
+ abort_test abort_install dyn_prepare dyn_configure \ |
189 |
dyn_compile dyn_test dyn_install \ |
190 |
dyn_preinst dyn_help debug-print debug-print-function \ |
191 |
debug-print-section inherit EXPORT_FUNCTIONS newdepend newrdepend \ |
192 |
|
193 |
Modified: main/branches/prefix/bin/portageq |
194 |
=================================================================== |
195 |
--- main/branches/prefix/bin/portageq 2008-08-24 13:14:29 UTC (rev 11461) |
196 |
+++ main/branches/prefix/bin/portageq 2008-08-24 13:21:34 UTC (rev 11462) |
197 |
@@ -214,6 +214,53 @@ |
198 |
|
199 |
owners.uses_root = True |
200 |
|
201 |
+def is_protected(argv): |
202 |
+ """<root> <filename> |
203 |
+ Given a single filename, return code 0 if it's protected, 1 otherwise. |
204 |
+ The filename must begin with <root>. |
205 |
+ """ |
206 |
+ if len(argv) != 2: |
207 |
+ sys.stderr.write("ERROR: expeced 2 parameters, got %d!\n" % len(argv)) |
208 |
+ sys.stderr.flush() |
209 |
+ return 2 |
210 |
+ |
211 |
+ root, filename = argv |
212 |
+ |
213 |
+ err = sys.stderr |
214 |
+ cwd = None |
215 |
+ try: |
216 |
+ cwd = os.getcwd() |
217 |
+ except OSError: |
218 |
+ pass |
219 |
+ |
220 |
+ f = portage.normalize_path(filename) |
221 |
+ if not f.startswith(os.path.sep): |
222 |
+ if cwd is None: |
223 |
+ err.write("ERROR: cwd does not exist!\n") |
224 |
+ err.flush() |
225 |
+ return 2 |
226 |
+ f = os.path.join(cwd, f) |
227 |
+ f = portage.normalize_path(f) |
228 |
+ |
229 |
+ if not f.startswith(root): |
230 |
+ err.write("ERROR: file paths must begin with <root>!\n") |
231 |
+ err.flush() |
232 |
+ return 2 |
233 |
+ |
234 |
+ import shlex |
235 |
+ from portage.util import ConfigProtect |
236 |
+ |
237 |
+ settings = portage.settings |
238 |
+ protect = shlex.split(settings.get("CONFIG_PROTECT", "")) |
239 |
+ protect_mask = shlex.split(settings.get("CONFIG_PROTECT_MASK", "")) |
240 |
+ protect_obj = ConfigProtect(root, protect, protect_mask) |
241 |
+ |
242 |
+ if protect_obj.isprotected(f): |
243 |
+ return 0 |
244 |
+ return 1 |
245 |
+ |
246 |
+is_protected.uses_root = True |
247 |
+ |
248 |
def best_visible(argv): |
249 |
"""<root> [<category/package>]+ |
250 |
Returns category/package-version (without .ebuild). |
251 |
|
252 |
Modified: main/branches/prefix/doc/package/ebuild/eapi/2.docbook |
253 |
=================================================================== |
254 |
--- main/branches/prefix/doc/package/ebuild/eapi/2.docbook 2008-08-24 13:14:29 UTC (rev 11461) |
255 |
+++ main/branches/prefix/doc/package/ebuild/eapi/2.docbook 2008-08-24 13:21:34 UTC (rev 11462) |
256 |
@@ -106,7 +106,7 @@ |
257 |
<para> |
258 |
The configure portion of the src_compile function has been |
259 |
split into a separate function which is named src_configure. The |
260 |
- src_configure function is called in between the src_unpack and |
261 |
+ src_configure function is called in-between the src_unpack and |
262 |
src_compile functions. |
263 |
</para> |
264 |
<programlisting> |
265 |
@@ -274,3 +274,16 @@ |
266 |
</section> |
267 |
</section> |
268 |
</section> |
269 |
+<section id='package-ebuild-eapi-2_pre3'> |
270 |
+ <title>EAPI 2_pre3</title> |
271 |
+ <section id='package-ebuild-eapi-2-phases'> |
272 |
+ <title>Phases</title> |
273 |
+ <section id='package-ebuild-eapi-2-phases-src-prepare'> |
274 |
+ <title>New src_prepare Phase Function</title> |
275 |
+ <para> |
276 |
+ A new src_prepare function is called in-between the src_unpack and |
277 |
+ src_configure functions, with cwd initially set to $S. |
278 |
+ </para> |
279 |
+ </section> |
280 |
+ </section> |
281 |
+</section> |
282 |
|
283 |
Modified: main/branches/prefix/man/emerge.1 |
284 |
=================================================================== |
285 |
--- main/branches/prefix/man/emerge.1 2008-08-24 13:14:29 UTC (rev 11461) |
286 |
+++ main/branches/prefix/man/emerge.1 2008-08-24 13:21:34 UTC (rev 11462) |
287 |
@@ -471,8 +471,7 @@ |
288 |
.TP |
289 |
\fBROOT\fR = \fI[path]\fR |
290 |
Use \fBROOT\fR to specify the target root filesystem to be used for |
291 |
-merging packages or ebuilds. This variable can be set in \fBmake.conf\fR(5) |
292 |
-when \fBPORTAGE_CONFIGROOT\fR has a value other than /. |
293 |
+merging packages or ebuilds. This variable can be set in \fBmake.conf\fR(5). |
294 |
.br |
295 |
Defaults to /. |
296 |
.TP |
297 |
|
298 |
Modified: main/branches/prefix/pym/_emerge/__init__.py |
299 |
=================================================================== |
300 |
--- main/branches/prefix/pym/_emerge/__init__.py 2008-08-24 13:14:29 UTC (rev 11461) |
301 |
+++ main/branches/prefix/pym/_emerge/__init__.py 2008-08-24 13:21:34 UTC (rev 11462) |
302 |
@@ -2615,7 +2615,7 @@ |
303 |
|
304 |
__slots__ = ("pkg", "scheduler", "settings") + ("_tree",) |
305 |
|
306 |
- _phases = ("configure", "compile", "test", "install") |
307 |
+ _phases = ("prepare", "configure", "compile", "test", "install") |
308 |
|
309 |
_live_eclasses = frozenset([ |
310 |
"cvs", |
311 |
@@ -2686,9 +2686,12 @@ |
312 |
|
313 |
pkg = self.pkg |
314 |
phases = self._phases |
315 |
- EAPIPREFIX |
316 |
- if pkg.metadata["EAPI"].replace(EAPIPREFIX, "").strip() in ("0", "1", "2_pre1"): |
317 |
- # skip src_configure |
318 |
+ eapi = pkg.metadata["EAPI"].replace(EAPIPREFIX, "").strip() |
319 |
+ if eapi in ("0", "1", "2_pre1"): |
320 |
+ # skip src_prepare and src_configure |
321 |
+ phases = phases[2:] |
322 |
+ elif eapi in ("2_pre2",): |
323 |
+ # skip src_prepare |
324 |
phases = phases[1:] |
325 |
|
326 |
for phase in phases: |
327 |
@@ -6787,7 +6790,6 @@ |
328 |
return ret |
329 |
|
330 |
repo_display = RepoDisplay(self.roots) |
331 |
- show_repos = False |
332 |
|
333 |
tree_nodes = [] |
334 |
display_list = [] |
335 |
@@ -6938,6 +6940,10 @@ |
336 |
# in size display (verbose mode) |
337 |
myfetchlist=[] |
338 |
|
339 |
+ # Use this set to detect when all the "repoadd" strings are "[0]" |
340 |
+ # and disable the entire repo display in this case. |
341 |
+ repoadd_set = set() |
342 |
+ |
343 |
for mylist_index in xrange(len(mylist)): |
344 |
x, depth, ordered = mylist[mylist_index] |
345 |
pkg_type = x[0] |
346 |
@@ -7086,7 +7092,8 @@ |
347 |
counters.new += 1 |
348 |
|
349 |
verboseadd = "" |
350 |
- |
351 |
+ repoadd = None |
352 |
+ |
353 |
if True: |
354 |
# USE flag display |
355 |
forced_flags = set() |
356 |
@@ -7206,7 +7213,7 @@ |
357 |
myfetchlist.append(myfetchfile) |
358 |
if ordered: |
359 |
counters.totalsize += mysize |
360 |
- verboseadd+=format_size(mysize)+" " |
361 |
+ verboseadd += format_size(mysize) |
362 |
|
363 |
# overlay verbose |
364 |
# assign index for a previous version in the same slot |
365 |
@@ -7221,7 +7228,6 @@ |
366 |
["repository"])[0] |
367 |
|
368 |
# now use the data to generate output |
369 |
- repoadd = None |
370 |
if pkg.installed or not has_previous: |
371 |
repoadd = repo_display.repoStr(repo_path_real) |
372 |
else: |
373 |
@@ -7235,9 +7241,8 @@ |
374 |
repoadd = "%s=>%s" % ( |
375 |
repo_display.repoStr(repo_path_prev), |
376 |
repo_display.repoStr(repo_path_real)) |
377 |
- if repoadd and repoadd != "0": |
378 |
- show_repos = True |
379 |
- verboseadd += teal("[%s]" % repoadd) |
380 |
+ if repoadd: |
381 |
+ repoadd_set.add(repoadd) |
382 |
|
383 |
xs = [portage.cpv_getkey(pkg_key)] + \ |
384 |
list(portage.catpkgsplit(pkg_key)[2:]) |
385 |
@@ -7318,6 +7323,7 @@ |
386 |
myprint=myprint+darkblue(" "+xs[1]+xs[2])+" " |
387 |
myprint=myprint+myoldbest |
388 |
myprint=myprint+darkgreen("to "+x[1]) |
389 |
+ verboseadd = None |
390 |
else: |
391 |
if not pkg_merge: |
392 |
myprint = "[%s] %s%s" % \ |
393 |
@@ -7333,21 +7339,21 @@ |
394 |
if (oldlp-nc_len(myprint)) > 0: |
395 |
myprint=myprint+" "*(oldlp-nc_len(myprint)) |
396 |
myprint=myprint+myoldbest |
397 |
- myprint=myprint+darkgreen("to "+x[1])+" "+verboseadd |
398 |
+ myprint += darkgreen("to " + pkg.root) |
399 |
else: |
400 |
if not pkg_merge: |
401 |
myprint = "[%s] " % pkgprint(pkg_status.ljust(13)) |
402 |
else: |
403 |
myprint = "[" + pkg_type + " " + addl + "] " |
404 |
myprint += indent + pkgprint(pkg_key) + " " + \ |
405 |
- myoldbest + darkgreen("to " + myroot) + " " + \ |
406 |
- verboseadd |
407 |
+ myoldbest + darkgreen("to " + myroot) |
408 |
else: |
409 |
if "--columns" in self.myopts: |
410 |
if "--quiet" in self.myopts: |
411 |
myprint=addl+" "+indent+pkgprint(pkg_cp) |
412 |
myprint=myprint+" "+green(xs[1]+xs[2])+" " |
413 |
myprint=myprint+myoldbest |
414 |
+ verboseadd = None |
415 |
else: |
416 |
if not pkg_merge: |
417 |
myprint = "[%s] %s%s" % \ |
418 |
@@ -7362,17 +7368,20 @@ |
419 |
myprint=myprint+green(" ["+xs[1]+xs[2]+"] ") |
420 |
if (oldlp-nc_len(myprint)) > 0: |
421 |
myprint=myprint+(" "*(oldlp-nc_len(myprint))) |
422 |
- myprint=myprint+myoldbest+" "+verboseadd |
423 |
+ myprint += myoldbest |
424 |
else: |
425 |
if not pkg_merge: |
426 |
- myprint = "[%s] %s%s %s %s" % \ |
427 |
+ myprint = "[%s] %s%s %s" % \ |
428 |
(pkgprint(pkg_status.ljust(13)), |
429 |
indent, pkgprint(pkg.cpv), |
430 |
- myoldbest, verboseadd) |
431 |
+ myoldbest) |
432 |
else: |
433 |
- myprint="["+pkgprint(pkg_type)+" "+addl+"] "+indent+pkgprint(pkg_key)+" "+myoldbest+" "+verboseadd |
434 |
- p.append(myprint) |
435 |
+ myprint = "[%s %s] %s%s %s" % \ |
436 |
+ (pkgprint(pkg_type), addl, indent, |
437 |
+ pkgprint(pkg.cpv), myoldbest) |
438 |
|
439 |
+ p.append((myprint, verboseadd, repoadd)) |
440 |
+ |
441 |
if "--tree" not in self.myopts and \ |
442 |
"--quiet" not in self.myopts and \ |
443 |
not self._opts_no_restart.intersection(self.myopts) and \ |
444 |
@@ -7391,8 +7400,24 @@ |
445 |
p.append(colorize("WARN", "*** Portage will stop merging at this point and reload itself,")) |
446 |
p.append(colorize("WARN", " then resume the merge.")) |
447 |
|
448 |
+ out = sys.stdout |
449 |
+ show_repos = repoadd_set != set(["0"]) |
450 |
+ |
451 |
for x in p: |
452 |
- print x |
453 |
+ if isinstance(x, basestring): |
454 |
+ out.write("%s\n" % (x,)) |
455 |
+ continue |
456 |
+ |
457 |
+ myprint, verboseadd, repoadd = x |
458 |
+ |
459 |
+ if verboseadd: |
460 |
+ myprint += " " + verboseadd |
461 |
+ |
462 |
+ if show_repos: |
463 |
+ myprint += " " + teal("[%s]" % repoadd) |
464 |
+ |
465 |
+ out.write("%s\n" % (myprint,)) |
466 |
+ |
467 |
for x in blockers: |
468 |
print x |
469 |
|
470 |
|
471 |
Modified: main/branches/prefix/pym/portage/__init__.py |
472 |
=================================================================== |
473 |
--- main/branches/prefix/pym/portage/__init__.py 2008-08-24 13:14:29 UTC (rev 11461) |
474 |
+++ main/branches/prefix/pym/portage/__init__.py 2008-08-24 13:21:34 UTC (rev 11462) |
475 |
@@ -4344,9 +4344,14 @@ |
476 |
if retval: |
477 |
return retval |
478 |
|
479 |
- if mydo == "configure" and mysettings["EAPI"] in ("0", "1", "2_pre1"): |
480 |
+ eapi = mysettings["EAPI"] |
481 |
+ |
482 |
+ if mydo == "configure" and eapi in ("0", "1", "2_pre1"): |
483 |
return os.EX_OK |
484 |
|
485 |
+ if mydo == "prepare" and eapi in ("0", "1", "2_pre1", "2_pre2"): |
486 |
+ return os.EX_OK |
487 |
+ |
488 |
kwargs = actionmap[mydo]["args"] |
489 |
mysettings["EBUILD_PHASE"] = mydo |
490 |
_doebuild_exit_status_unlink( |
491 |
@@ -4615,7 +4620,7 @@ |
492 |
eapi.remove(prop) |
493 |
|
494 |
# now check if what's left is supported (can) |
495 |
- properties = [ "2_pre2", "2_pre1" ] # another clumpsy solution |
496 |
+ properties = [ "2_pre3", "2_pre2", "2_pre1" ] # another clumpsy solution |
497 |
for i in range(portage.const.EAPI + 1): |
498 |
properties.append(str(i)) |
499 |
|
500 |
@@ -5153,7 +5158,8 @@ |
501 |
actionmap_deps={ |
502 |
"setup": [], |
503 |
"unpack": ["setup"], |
504 |
- "configure": ["unpack"], |
505 |
+ "prepare": ["unpack"], |
506 |
+ "configure": ["prepare"], |
507 |
"compile":["configure"], |
508 |
"test": ["compile"], |
509 |
"install":["test"], |
510 |
@@ -5175,7 +5181,7 @@ |
511 |
validcommands = ["help","clean","prerm","postrm","cleanrm","preinst","postinst", |
512 |
"config", "info", "setup", "depend", |
513 |
"fetch", "fetchall", "digest", |
514 |
- "unpack", "configure", "compile", "test", |
515 |
+ "unpack", "prepare", "configure", "compile", "test", |
516 |
"install", "rpm", "qmerge", "merge", |
517 |
"package","unmerge", "manifest"] |
518 |
|
519 |
@@ -5447,7 +5453,7 @@ |
520 |
writemsg("Can not execute files in %s\n" % checkdir + \ |
521 |
"Likely cause is that you've mounted it with one of the\n" + \ |
522 |
"following mount options: 'noexec', 'user', 'users'\n\n" + \ |
523 |
- "Please make sure that portage can execute files in this direxctory.\n" \ |
524 |
+ "Please make sure that portage can execute files in this directory.\n" \ |
525 |
, noiselevel=-1) |
526 |
fd.close() |
527 |
return 1 |
528 |
@@ -5761,6 +5767,7 @@ |
529 |
actionmap = { |
530 |
"setup": {"cmd":ebuild_sh, "args":{"droppriv":0, "free":1, "sesandbox":0, "fakeroot":0}}, |
531 |
"unpack": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":0, "sesandbox":sesandbox, "fakeroot":0}}, |
532 |
+"prepare": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":0, "sesandbox":sesandbox, "fakeroot":0}}, |
533 |
"configure":{"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}}, |
534 |
"compile": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}}, |
535 |
"test": {"cmd":ebuild_sh, "args":{"droppriv":droppriv, "free":nosandbox, "sesandbox":sesandbox, "fakeroot":0}}, |
536 |
|
537 |
Modified: main/branches/prefix/pym/portage/const.py |
538 |
=================================================================== |
539 |
--- main/branches/prefix/pym/portage/const.py 2008-08-24 13:14:29 UTC (rev 11461) |
540 |
+++ main/branches/prefix/pym/portage/const.py 2008-08-24 13:21:34 UTC (rev 11462) |
541 |
@@ -79,7 +79,7 @@ |
542 |
"ACCEPT_KEYWORDS", "ACCEPT_LICENSE", |
543 |
"CONFIG_PROTECT_MASK", "CONFIG_PROTECT", |
544 |
"PRELINK_PATH", "PRELINK_PATH_MASK", "PROFILE_ONLY_VARIABLES"] |
545 |
-EBUILD_PHASES = ["setup", "unpack", "configure", |
546 |
+EBUILD_PHASES = ["setup", "unpack", "prepare", "configure", |
547 |
"compile", "test", "install", |
548 |
"package", "preinst", "postinst","prerm", "postrm", |
549 |
"nofetch", "config", "info", "other"] |
550 |
|
551 |
Modified: main/branches/prefix/pym/portage/dbapi/vartree.py |
552 |
=================================================================== |
553 |
--- main/branches/prefix/pym/portage/dbapi/vartree.py 2008-08-24 13:14:29 UTC (rev 11461) |
554 |
+++ main/branches/prefix/pym/portage/dbapi/vartree.py 2008-08-24 13:21:34 UTC (rev 11462) |
555 |
@@ -1843,8 +1843,8 @@ |
556 |
|
557 |
self.myroot=myroot |
558 |
protect_obj = ConfigProtect(myroot, |
559 |
- mysettings.get("CONFIG_PROTECT","").split(), |
560 |
- mysettings.get("CONFIG_PROTECT_MASK","").split()) |
561 |
+ shlex.split(mysettings.get("CONFIG_PROTECT", "")), |
562 |
+ shlex.split(mysettings.get("CONFIG_PROTECT_MASK", ""))) |
563 |
self.updateprotect = protect_obj.updateprotect |
564 |
self.isprotected = protect_obj.isprotected |
565 |
self._installed_instance = None |
566 |
@@ -2800,8 +2800,9 @@ |
567 |
if f[0] != "/": |
568 |
f="/"+f |
569 |
isowned = False |
570 |
+ full_path = os.path.join(destroot, f.lstrip(os.path.sep)) |
571 |
for ver in [self] + mypkglist: |
572 |
- if (ver.isowner(f, destroot) or ver.isprotected(f)): |
573 |
+ if (ver.isowner(f, destroot) or ver.isprotected(full_path)): |
574 |
isowned = True |
575 |
break |
576 |
if not isowned: |