diff options
-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(): |