summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-10-02 00:44:51 +0000
committerZac Medico <zmedico@gentoo.org>2008-10-02 00:44:51 +0000
commit0fefe35b656c3a07009789c33d08ff3f4c276d46 (patch)
tree7ea1e5e7b6ba98f19373d72c9eda9539cdf7a7b3
parentdbf0b9ca3ca89cc14941f646735e987044cd2f8f (diff)
downloadportage-0fefe35b656c3a07009789c33d08ff3f4c276d46.tar.gz
portage-0fefe35b656c3a07009789c33d08ff3f4c276d46.tar.bz2
portage-0fefe35b656c3a07009789c33d08ff3f4c276d46.zip
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
-rw-r--r--pym/portage/elog/__init__.py20
1 files 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: