1 |
Author: zmedico |
2 |
Date: 2009-04-30 06:59:41 +0000 (Thu, 30 Apr 2009) |
3 |
New Revision: 13467 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.6/pym/portage/__init__.py |
7 |
Log: |
8 |
Fix some _doebuild_exit_status_check() calls so that they only happen when |
9 |
the bash process exits successfully (for consistency with usage elsewhere). |
10 |
When calling this functions, we're mainly concerned about false success, and |
11 |
we always want to allow things like using bashrc die hooks to clean up |
12 |
$PORTAGE_BUILDDIR for users that are building in tmpfs (in which case the |
13 |
exit status file may be removed before bash exits). (trunk r13296) |
14 |
|
15 |
Modified: main/branches/2.1.6/pym/portage/__init__.py |
16 |
=================================================================== |
17 |
--- main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 06:59:20 UTC (rev 13466) |
18 |
+++ main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 06:59:41 UTC (rev 13467) |
19 |
@@ -4738,14 +4738,16 @@ |
20 |
|
21 |
if returnpid: |
22 |
return phase_retval |
23 |
- msg = _doebuild_exit_status_check(mydo, mysettings) |
24 |
- if msg: |
25 |
- phase_retval = 1 |
26 |
- from textwrap import wrap |
27 |
- from portage.elog.messages import eerror |
28 |
- for l in wrap(msg, 72): |
29 |
- eerror(l, phase=mydo, key=mysettings.mycpv) |
30 |
|
31 |
+ if phase_retval == os.EX_OK: |
32 |
+ msg = _doebuild_exit_status_check(mydo, mysettings) |
33 |
+ if msg: |
34 |
+ phase_retval = 1 |
35 |
+ from textwrap import wrap |
36 |
+ from portage.elog.messages import eerror |
37 |
+ for l in wrap(msg, 72): |
38 |
+ eerror(l, phase=mydo, key=mysettings.mycpv) |
39 |
+ |
40 |
_post_phase_userpriv_perms(mysettings) |
41 |
if mydo == "install": |
42 |
_check_build_log(mysettings) |
43 |
@@ -5017,13 +5019,14 @@ |
44 |
logfile=logfile, **kwargs) |
45 |
finally: |
46 |
pass |
47 |
- msg = _doebuild_exit_status_check(mydo, mysettings) |
48 |
- if msg: |
49 |
- rval = 1 |
50 |
- from textwrap import wrap |
51 |
- from portage.elog.messages import eerror |
52 |
- for l in wrap(msg, 72): |
53 |
- eerror(l, phase=mydo, key=mysettings.mycpv) |
54 |
+ if rval == os.EX_OK: |
55 |
+ msg = _doebuild_exit_status_check(mydo, mysettings) |
56 |
+ if msg: |
57 |
+ rval = 1 |
58 |
+ from textwrap import wrap |
59 |
+ from portage.elog.messages import eerror |
60 |
+ for l in wrap(msg, 72): |
61 |
+ eerror(l, phase=mydo, key=mysettings.mycpv) |
62 |
return rval |
63 |
|
64 |
_testing_eapis = frozenset() |