summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/__init__.py31
1 files changed, 17 insertions, 14 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 4e07a2b90..a914f2f32 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -4748,13 +4748,15 @@ def spawnebuild(mydo, actionmap, mysettings, debug, alwaysdep=0,
if returnpid:
return phase_retval
- msg = _doebuild_exit_status_check(mydo, mysettings)
- if msg:
- phase_retval = 1
- from textwrap import wrap
- from portage.elog.messages import eerror
- for l in wrap(msg, 72):
- eerror(l, phase=mydo, key=mysettings.mycpv)
+
+ if phase_retval == os.EX_OK:
+ msg = _doebuild_exit_status_check(mydo, mysettings)
+ if msg:
+ phase_retval = 1
+ from textwrap import wrap
+ from portage.elog.messages import eerror
+ for l in wrap(msg, 72):
+ eerror(l, phase=mydo, key=mysettings.mycpv)
_post_phase_userpriv_perms(mysettings)
if mydo == "install":
@@ -5027,13 +5029,14 @@ def _spawn_misc_sh(mysettings, commands, **kwargs):
logfile=logfile, **kwargs)
finally:
pass
- msg = _doebuild_exit_status_check(mydo, mysettings)
- if msg:
- rval = 1
- from textwrap import wrap
- from portage.elog.messages import eerror
- for l in wrap(msg, 72):
- eerror(l, phase=mydo, key=mysettings.mycpv)
+ if rval == os.EX_OK:
+ msg = _doebuild_exit_status_check(mydo, mysettings)
+ if msg:
+ rval = 1
+ from textwrap import wrap
+ from portage.elog.messages import eerror
+ for l in wrap(msg, 72):
+ eerror(l, phase=mydo, key=mysettings.mycpv)
return rval
_testing_eapis = frozenset(["3_pre1"])