diff options
Diffstat (limited to 'pym/portage')
-rw-r--r-- | pym/portage/elog/__init__.py | 5 | ||||
-rw-r--r-- | pym/portage/elog/mod_custom.py | 5 | ||||
-rw-r--r-- | pym/portage/elog/mod_echo.py | 30 | ||||
-rw-r--r-- | pym/portage/elog/mod_mail.py | 4 | ||||
-rw-r--r-- | pym/portage/elog/mod_mail_summary.py | 6 | ||||
-rw-r--r-- | pym/portage/elog/mod_save.py | 5 | ||||
-rw-r--r-- | pym/portage/elog/mod_save_summary.py | 5 | ||||
-rw-r--r-- | pym/portage/elog/mod_syslog.py | 5 |
8 files changed, 60 insertions, 5 deletions
diff --git a/pym/portage/elog/__init__.py b/pym/portage/elog/__init__.py index c6f6ec47c..be7eb5b66 100644 --- a/pym/portage/elog/__init__.py +++ b/pym/portage/elog/__init__.py @@ -1,3 +1,8 @@ +# elog/__init__.py - elog core functions +# Copyright 2006-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + from portage.const import EBUILD_PHASES from portage.exception import PortageException from portage.process import atexit_register diff --git a/pym/portage/elog/mod_custom.py b/pym/portage/elog/mod_custom.py index 5fae84078..3433bbbf1 100644 --- a/pym/portage/elog/mod_custom.py +++ b/pym/portage/elog/mod_custom.py @@ -1,3 +1,8 @@ +# elog/mod_custom.py - elog dispatch module +# Copyright 2006-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + import portage.elog_modules.mod_save, portage.process, portage.exception def process(mysettings, cpv, logentries, fulltext): diff --git a/pym/portage/elog/mod_echo.py b/pym/portage/elog/mod_echo.py new file mode 100644 index 000000000..73928b437 --- /dev/null +++ b/pym/portage/elog/mod_echo.py @@ -0,0 +1,30 @@ +# elog/mod_echo.py - elog dispatch module +# Copyright 2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +from portage.output import EOutput +from portage.const import EBUILD_PHASES + +_items = {} +def process(mysettings, cpv, logentries, fulltext): + _items[cpv] = logentries + +def finalize(mysettings): + printer = EOutput() + for cpv in _items.keys(): + print + printer.einfo("Messages for package %s:" % cpv) + print + for phase in EBUILD_PHASES: + if not phase in _items[cpv]: + continue + for msgtype, msgcontent in _items[cpv][phase]: + fmap = {"INFO": printer.einfo, + "WARN": printer.ewarn, + "ERROR": printer.eerror, + "LOG": printer.einfo, + "QA": printer.ewarn} + for line in msgcontent: + fmap[msgtype](line.strip("\n")) + return diff --git a/pym/portage/elog/mod_mail.py b/pym/portage/elog/mod_mail.py index b84555e8c..4695e8ec4 100644 --- a/pym/portage/elog/mod_mail.py +++ b/pym/portage/elog/mod_mail.py @@ -1,5 +1,5 @@ -# portage.py -- core Portage functionality -# Copyright 1998-2004 Gentoo Foundation +# elog/mod_mail.py - elog dispatch module +# Copyright 2006-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ diff --git a/pym/portage/elog/mod_mail_summary.py b/pym/portage/elog/mod_mail_summary.py index 99c285642..a1f4ed57f 100644 --- a/pym/portage/elog/mod_mail_summary.py +++ b/pym/portage/elog/mod_mail_summary.py @@ -1,7 +1,7 @@ -# portage.py -- core Portage functionality -# Copyright 1998-2004 Gentoo Foundation +# elog/mod_mail_summary.py - elog dispatch module +# Copyright 2006-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id: mod_mail.py 3484 2006-06-10 22:38:44Z genone $ +# $Id$ import portage.mail, socket, os, time from email.MIMEText import MIMEText as TextMessage diff --git a/pym/portage/elog/mod_save.py b/pym/portage/elog/mod_save.py index 2993b45db..eff40edd9 100644 --- a/pym/portage/elog/mod_save.py +++ b/pym/portage/elog/mod_save.py @@ -1,3 +1,8 @@ +# elog/mod_save.py - elog dispatch module +# Copyright 2006-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + import os, time from portage.data import portage_uid, portage_gid diff --git a/pym/portage/elog/mod_save_summary.py b/pym/portage/elog/mod_save_summary.py index eb453e587..aebc6f9aa 100644 --- a/pym/portage/elog/mod_save_summary.py +++ b/pym/portage/elog/mod_save_summary.py @@ -1,3 +1,8 @@ +# elog/mod_save_summary.py - elog dispatch module +# Copyright 2006-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + import os, time from portage.data import portage_uid, portage_gid diff --git a/pym/portage/elog/mod_syslog.py b/pym/portage/elog/mod_syslog.py index 77e1d4ea6..28aa15b3c 100644 --- a/pym/portage/elog/mod_syslog.py +++ b/pym/portage/elog/mod_syslog.py @@ -1,3 +1,8 @@ +# elog/mod_syslog.py - elog dispatch module +# Copyright 2006-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + import syslog from portage.const import EBUILD_PHASES |