summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/AbstractEbuildProcess.py14
-rw-r--r--pym/_emerge/EbuildPhase.py16
2 files changed, 16 insertions, 14 deletions
diff --git a/pym/_emerge/AbstractEbuildProcess.py b/pym/_emerge/AbstractEbuildProcess.py
index a74a39437..ed20b14f9 100644
--- a/pym/_emerge/AbstractEbuildProcess.py
+++ b/pym/_emerge/AbstractEbuildProcess.py
@@ -59,20 +59,6 @@ class AbstractEbuildProcess(SpawnProcess):
self.wait()
return
- if need_builddir:
- phase_completed_file = os.path.join(
- self.settings['PORTAGE_BUILDDIR'],
- ".%sed" % self.phase.rstrip('e'))
- if not os.path.exists(phase_completed_file):
- # If the phase is really going to run then we want
- # to eliminate any stale elog messages that may
- # exist from a previous run.
- try:
- os.unlink(os.path.join(self.settings['T'],
- 'logging', self.phase))
- except OSError:
- pass
-
if self.background:
# Automatically prevent color codes from showing up in logs,
# since we're not displaying to a terminal anyway.
diff --git a/pym/_emerge/EbuildPhase.py b/pym/_emerge/EbuildPhase.py
index 117471335..9eabb3402 100644
--- a/pym/_emerge/EbuildPhase.py
+++ b/pym/_emerge/EbuildPhase.py
@@ -30,6 +30,22 @@ class EbuildPhase(CompositeTask):
def _start(self):
+ need_builddir = self.phase not in EbuildProcess._phases_without_builddir
+
+ if need_builddir:
+ phase_completed_file = os.path.join(
+ self.settings['PORTAGE_BUILDDIR'],
+ ".%sed" % self.phase.rstrip('e'))
+ if not os.path.exists(phase_completed_file):
+ # If the phase is really going to run then we want
+ # to eliminate any stale elog messages that may
+ # exist from a previous run.
+ try:
+ os.unlink(os.path.join(self.settings['T'],
+ 'logging', self.phase))
+ except OSError:
+ pass
+
if self.phase == 'setup':
use = self.settings.get('PORTAGE_BUILT_USE')