From: Zac Medico Date: Thu, 7 Oct 2010 18:31:35 +0000 (-0700) Subject: Preserve message continuity in elog_process(). X-Git-Tag: v2.1.9.14~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0af611e7692279d3d0f96c45a00ef2d94dbf55ea;p=portage.git Preserve message continuity in elog_process(). --- 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():