From 7cba4cf96291fddb6a93586caef1328008a3ac5d Mon Sep 17 00:00:00 2001 From: Sebastian Luther Date: Mon, 6 Sep 2010 14:33:56 +0200 Subject: [PATCH] Use metadata.xml to print maintainer information in build.log --- pym/_emerge/EbuildPhase.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pym/_emerge/EbuildPhase.py b/pym/_emerge/EbuildPhase.py index fd010c059..75dd123ff 100644 --- a/pym/_emerge/EbuildPhase.py +++ b/pym/_emerge/EbuildPhase.py @@ -9,6 +9,7 @@ from _emerge.MiscFunctionsProcess import MiscFunctionsProcess from _emerge.EbuildProcess import EbuildProcess from _emerge.CompositeTask import CompositeTask from portage.util import writemsg +from portage.xml.metadata import MetaDataXML import portage portage.proxy.lazyimport.lazyimport(globals(), 'portage.elog:messages@elog_messages', @@ -35,9 +36,20 @@ class EbuildPhase(CompositeTask): if use is None: use = self.settings['PORTAGE_USE'] + maint_str = "" + metadata_xml_path = os.path.join(os.path.dirname(self.settings['EBUILD']), "metadata.xml") + if os.path.isfile(metadata_xml_path): + try: + metadata_xml = MetaDataXML(metadata_xml_path, self.settings) + maint_str = metadata_xml.format_maintainer_string() + except SyntaxError: + maint_str = "" + msg = [] msg.append("CPV: %s" % self.settings.mycpv) msg.append("REPO: %s" % self.settings['PORTAGE_REPO_NAME']) + if maint_str: + msg.append("Maintainer: %s" % maint_str) msg.append("USE: %s" % use) self._elog('einfo', msg) -- 2.26.2