summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-10-07 11:31:35 -0700
committerZac Medico <zmedico@gentoo.org>2010-10-07 12:17:29 -0700
commit0af611e7692279d3d0f96c45a00ef2d94dbf55ea (patch)
tree6d2c5053fe4090b8d2c0d21bed61aa21fddbb94b
parent295198d5343ea8004707c64aad293a4693c7e753 (diff)
downloadportage-0af611e7692279d3d0f96c45a00ef2d94dbf55ea.tar.gz
portage-0af611e7692279d3d0f96c45a00ef2d94dbf55ea.tar.bz2
portage-0af611e7692279d3d0f96c45a00ef2d94dbf55ea.zip
Preserve message continuity in elog_process().
-rw-r--r--pym/portage/elog/__init__.py2
-rw-r--r--pym/portage/elog/messages.py11
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():