From 34cf462e0d79346009462508acfb0a269300ea3a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 27 Jun 2007 01:25:02 +0000 Subject: [PATCH] Preserve merge order in elog output. (trunk r7046) svn path=/main/branches/2.1.2/; revision=7048 --- pym/elog_modules/mod_echo.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/pym/elog_modules/mod_echo.py b/pym/elog_modules/mod_echo.py index b694565c6..6d2c95f4e 100644 --- a/pym/elog_modules/mod_echo.py +++ b/pym/elog_modules/mod_echo.py @@ -6,25 +6,18 @@ from output import EOutput from portage_const import EBUILD_PHASES -_items = {} +_items = [] def process(mysettings, key, logentries, fulltext): global _items - config_root = mysettings["PORTAGE_CONFIGROOT"] - mysettings, items = _items.setdefault(config_root, (mysettings, {})) - items[key] = logentries + _items.append((mysettings, key, logentries)) def finalize(): global _items - for mysettings, items in _items.itervalues(): - _finalize(mysettings, items) - _items.clear() - -def _finalize(mysettings, items): printer = EOutput() - root_msg = "" - if mysettings["ROOT"] != "/": - root_msg = " merged to %s" % mysettings["ROOT"] - for key, logentries in items.iteritems(): + for mysettings, key, logentries in _items: + root_msg = "" + if mysettings["ROOT"] != "/": + root_msg = " merged to %s" % mysettings["ROOT"] print printer.einfo("Messages for package %s%s:" % (key, root_msg)) print @@ -39,4 +32,5 @@ def _finalize(mysettings, items): "QA": printer.ewarn} for line in msgcontent: fmap[msgtype](line.strip("\n")) + _items = [] return -- 2.26.2