From f2468b530d094199b5e91d0856e99f6caf20c5e2 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 23 Mar 2006 02:18:27 +0000 Subject: When the post preinst shell tasks fail, write a message to stderr and return it's exit status so that die calls (inside preinst_selinux_labels for example) can work correctly. svn path=/main/trunk/; revision=2974 --- pym/portage.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pym/portage.py b/pym/portage.py index 9a3896031..b4f05f75d 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -2737,7 +2737,9 @@ def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,clea # Post phase logic and tasks that have been factored out of ebuild.sh. myargs = [MISC_SH_BINARY, "preinst_mask", "preinst_sfperms", "preinst_selinux_labels", "preinst_suid_scan"] - spawn(" ".join(myargs), mysettings, debug=debug, free=1, logfile=logfile) + phase_retval = spawn(" ".join(myargs), mysettings, debug=debug, free=1, logfile=logfile) + if phase_retval != os.EX_OK: + writemsg("!!! post preinst failed; exiting.\n") del mysettings["IMAGE"] return phase_retval elif mydo in ["prerm","postrm","postinst","config"]: -- cgit v1.2.3-1-g7c22