diff options
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage/package/ebuild/doebuild.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 696b65eb7..a61a56687 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -92,6 +92,18 @@ def _doebuild_spawn(phase, settings, actionmap=None, **kwargs): os.path.basename(EBUILD_SH_BINARY))), ebuild_sh_arg) + if phase not in EbuildSpawnProcess._phases_without_builddir: + phase_completed_file = os.path.join(settings['PORTAGE_BUILDIR'], + phase.rstrip('e') + 'ed') + 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(settings['T'], 'logging', phase)) + except OSError: + pass + settings['EBUILD_PHASE'] = phase try: return spawn(cmd, settings, **kwargs) |