diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-10-07 11:31:35 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-10-07 11:31:35 -0700 |
commit | f3c54a516daac603fdf9e97f99c58227cde85afb (patch) | |
tree | 72cdbe20983d5b5ce02a8e19d35dde0d2b72cde8 | |
parent | 1e1fe939cc6bfdfc66fef6b7890864564600e9a8 (diff) | |
download | portage-f3c54a516daac603fdf9e97f99c58227cde85afb.tar.gz portage-f3c54a516daac603fdf9e97f99c58227cde85afb.tar.bz2 portage-f3c54a516daac603fdf9e97f99c58227cde85afb.zip |
Preserve message continuity in elog_process().
-rw-r--r-- | pym/portage/elog/__init__.py | 2 | ||||
-rw-r--r-- | pym/portage/elog/messages.py | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/pym/portage/elog/__init__.py b/pym/portage/elog/__init__.py index 090b541b8..78b6d8398 100644 --- a/pym/portage/elog/__init__.py +++ b/pym/portage/elog/__init__.py @@ -93,7 +93,7 @@ def elog_process(cpv, mysettings, phasefilter=None): # A build dir isn't necessarily required since the messages.e* # functions allow messages to be generated in-memory. ebuild_logentries = {} - all_logentries = collect_messages() + all_logentries = collect_messages(key=cpv) if cpv in all_logentries: # Messages generated by the python elog implementation are assumed # to come first. For example, this ensures correct order for einfo diff --git a/pym/portage/elog/messages.py b/pym/portage/elog/messages.py index 9a0e510fb..bee0a7747 100644 --- a/pym/portage/elog/messages.py +++ b/pym/portage/elog/messages.py @@ -121,11 +121,16 @@ def _elog_base(level, msg, phase="other", key=None, color=None, out=None): #raise NotImplementedError() -def collect_messages(): +def collect_messages(key=None): global _msgbuffer - rValue = _msgbuffer - _reset_buffer() + if key is None: + rValue = _msgbuffer + _reset_buffer() + else: + rValue = {} + if key in _msgbuffer: + rValue[key] = _msgbuffer.pop(key) return rValue def _reset_buffer(): |