summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-04 23:23:54 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-04 23:23:54 -0700
commita5663a3fdc594c403452048b2c96fec33b0b8f9d (patch)
treed9f50f831f90fbfb57b4b3853777a96c06856020 /pym
parent8b433bcf960bf12dc85fcb77e900f72155eded73 (diff)
downloadportage-a5663a3fdc594c403452048b2c96fec33b0b8f9d.tar.gz
portage-a5663a3fdc594c403452048b2c96fec33b0b8f9d.tar.bz2
portage-a5663a3fdc594c403452048b2c96fec33b0b8f9d.zip
In AbstractEbuildProcess._start(), verify that PORTAGE_BUILDIR
exists and bail out if necessary.
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/AbstractEbuildProcess.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/pym/_emerge/AbstractEbuildProcess.py b/pym/_emerge/AbstractEbuildProcess.py
index 61cd02fd8..28e783e08 100644
--- a/pym/_emerge/AbstractEbuildProcess.py
+++ b/pym/_emerge/AbstractEbuildProcess.py
@@ -44,6 +44,19 @@ class AbstractEbuildProcess(SpawnProcess):
def _start(self):
+ # This can happen if the pre-clean phase triggers
+ # die_hooks for some reason, and PORTAGE_BUILDDIR
+ # doesn't exist yet.
+ if self.phase not in self._phases_without_builddir and \
+ not os.path.isdir(self.settings['PORTAGE_BUILDDIR']):
+ msg = _("The ebuild phase '%s' has been aborted "
+ "since PORTAGE_BUILDIR does not exist: '%s'") % \
+ (self.phase, self.settings['PORTAGE_BUILDDIR'])
+ self._eerror(textwrap.wrap(msg, 72))
+ self._set_returncode((self.pid, 1))
+ self.wait()
+ return
+
if self.background:
# Automatically prevent color codes from showing up in logs,
# since we're not displaying to a terminal anyway.