diff options
-rw-r--r-- | pym/_emerge/AbstractEbuildProcess.py | 13 |
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. |