# 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
#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():