public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r13296 - main/trunk/pym/portage
@ 2009-04-07 17:21 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-04-07 17:21 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2009-04-07 17:21:04 +0000 (Tue, 07 Apr 2009)
New Revision: 13296

Modified:
   main/trunk/pym/portage/__init__.py
Log:
Fix some _doebuild_exit_status_check() calls so that they only happen when
the bash process exits successfully (for consistency with usage elsewhere).
When calling this functions, we're mainly concerned about false success, and
we always want to allow things like using bashrc die hooks to clean up
$PORTAGE_BUILDDIR for users that are building in tmpfs (in which case the
exit status file may be removed before bash exits).


Modified: main/trunk/pym/portage/__init__.py
===================================================================
--- main/trunk/pym/portage/__init__.py	2009-04-07 01:27:54 UTC (rev 13295)
+++ main/trunk/pym/portage/__init__.py	2009-04-07 17:21:04 UTC (rev 13296)
@@ -4748,14 +4748,16 @@
 
 	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":
 		_check_build_log(mysettings)
@@ -5027,13 +5029,14 @@
 			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"])




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-07 17:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-07 17:21 [gentoo-commits] portage r13296 - main/trunk/pym/portage Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox