From 0fefe35b656c3a07009789c33d08ff3f4c276d46 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 2 Oct 2008 00:44:51 +0000 Subject: [PATCH] When parsing PORTAGE_ELOG_SYSTEM, stack values in a dict so that things like "echo:info echo:qa" stack like one might expect. Thanks to Betelgeuse for reporting. svn path=/main/trunk/; revision=11605 --- pym/portage/elog/__init__.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pym/portage/elog/__init__.py b/pym/portage/elog/__init__.py index 8c81e260b..b24c9d9dd 100644 --- a/pym/portage/elog/__init__.py +++ b/pym/portage/elog/__init__.py @@ -91,6 +91,19 @@ def elog_process(cpv, mysettings, phasefilter=None): all_logentries[key], _preserve_logentries[key] = phasefilter(all_logentries[key]) my_elog_classes = set(mysettings.get("PORTAGE_ELOG_CLASSES", "").split()) + logsystems = {} + for token in mysettings.get("PORTAGE_ELOG_SYSTEM", "").split(): + if ":" in token: + s, levels = token.split(":", 1) + levels = levels.split(",") + else: + s = token + levels = () + levels_set = logsystems.get(s) + if levels_set is None: + levels_set = set() + logsystems[s] = levels_set + levels_set.update(levels) for key in all_logentries: default_logentries = filter_loglevels(all_logentries[key], my_elog_classes) @@ -106,12 +119,9 @@ def elog_process(cpv, mysettings, phasefilter=None): default_logentries, default_fulllog) # pass the processing to the individual modules - logsystems = mysettings["PORTAGE_ELOG_SYSTEM"].split() - for s in logsystems: + for s, levels in logsystems.iteritems(): # allow per module overrides of PORTAGE_ELOG_CLASSES - if ":" in s: - s, levels = s.split(":", 1) - levels = levels.split(",") + if levels: mod_logentries = filter_loglevels(all_logentries[key], levels) mod_fulllog = _combine_logentries(mod_logentries) else: -- 2.26.2