diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-07 12:51:08 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-07 12:51:08 -0700 |
commit | ba32c33455b32fdea5c0355af4caf118a266c9cf (patch) | |
tree | ecdd6756895b1f31d344847218c5f44d4d95c254 /pym/portage | |
parent | b7be0b42ccfee6c30e7bcd6f4427aeafa67f4791 (diff) | |
download | portage-ba32c33455b32fdea5c0355af4caf118a266c9cf.tar.gz portage-ba32c33455b32fdea5c0355af4caf118a266c9cf.tar.bz2 portage-ba32c33455b32fdea5c0355af4caf118a266c9cf.zip |
Move stale elog cleanup code from ebuild.sh to _doebuild_spawn(), so
that elog messages generated by bashrc are preserved when appropriate.
Diffstat (limited to 'pym/portage')
-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) |