summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-27 21:56:58 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-27 21:56:58 +0000
commit8c1d81ba0153abe7b8a4b460f4fc3728b6d152ff (patch)
tree4f6c12de57da123a4ea8ab468a8e375924a1d8a5 /pym
parent0363a5b7bc65a86c2e500a0f3018d6a83b721acf (diff)
downloadportage-8c1d81ba0153abe7b8a4b460f4fc3728b6d152ff.tar.gz
portage-8c1d81ba0153abe7b8a4b460f4fc3728b6d152ff.tar.bz2
portage-8c1d81ba0153abe7b8a4b460f4fc3728b6d152ff.zip
portage upgrade or downgrade invalidates EBUILD_EXIT_STATUS_FILE
sanity checks since ebuild.sh portage version may differ from the current instance that is running in python. svn path=/main/trunk/; revision=8714
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 127f0ee8b..980011f0c 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -3578,8 +3578,7 @@ def spawnebuild(mydo,actionmap,mysettings,debug,alwaysdep=0,logfile=None):
mysettings.get("EBUILD_EXIT_STATUS_FILE"))
phase_retval = spawn(actionmap[mydo]["cmd"] % mydo, mysettings, debug=debug, logfile=logfile, **kwargs)
mysettings["EBUILD_PHASE"] = ""
- msg = _doebuild_exit_status_check(
- mydo, mysettings.get("EBUILD_EXIT_STATUS_FILE"))
+ msg = _doebuild_exit_status_check(mydo, mysettings)
if msg:
phase_retval = 1
from textwrap import wrap
@@ -3973,11 +3972,19 @@ def prepare_build_dirs(myroot, mysettings, cleanup):
mysettings["PORTAGE_LOG_FILE"] = os.path.join(
mysettings["T"], "build.log")
-def _doebuild_exit_status_check(mydo, exit_status_file):
+def _doebuild_exit_status_check(mydo, settings):
"""
Returns an error string if the shell appeared
to exit unsuccessfully, None otherwise.
"""
+ if settings["ROOT"] == "/":
+ cat, pn, ver, rev = catpkgsplit(settings.mycpv)
+ if pn == "portage":
+ # portage upgrade or downgrade invalidates this check
+ # since ebuild.sh portage version may differ from the
+ # current instance that is running in python.
+ return None
+ exit_status_file = settings.get("EBUILD_EXIT_STATUS_FILE")
if not exit_status_file or \
os.path.exists(exit_status_file):
return None
@@ -4149,8 +4156,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
def exit_status_check(retval):
if retval != os.EX_OK:
return retval
- msg = _doebuild_exit_status_check(
- mydo, mysettings.get("EBUILD_EXIT_STATUS_FILE"))
+ msg = _doebuild_exit_status_check(mydo, mysettings)
if msg:
retval = 1
from textwrap import wrap