diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-07 16:56:49 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-07 16:56:49 -0700 |
commit | 9977cd5dfe5143d13becf3e39baaf141685a23d7 (patch) | |
tree | df3430c1394aec68ba3cfab82d7488b5e3204565 | |
parent | 80f05f892db11ece3cdfec0c267307652e0b7502 (diff) | |
download | portage-9977cd5dfe5143d13becf3e39baaf141685a23d7.tar.gz portage-9977cd5dfe5143d13becf3e39baaf141685a23d7.tar.bz2 portage-9977cd5dfe5143d13becf3e39baaf141685a23d7.zip |
Move the stale elog cleanup code from AbstractEbuildProcess to
EbuildPhase.
-rw-r--r-- | pym/_emerge/AbstractEbuildProcess.py | 14 | ||||
-rw-r--r-- | pym/_emerge/EbuildPhase.py | 16 |
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') |