summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2010-09-06 14:33:56 +0200
committerZac Medico <zmedico@gentoo.org>2010-09-06 10:06:43 -0700
commit7cba4cf96291fddb6a93586caef1328008a3ac5d (patch)
tree3b986afd8d6f8c19d5def48184cdbec455a5e1f1
parente16d717b0dba45a3b69c01a29a61a1909d892462 (diff)
downloadportage-7cba4cf96291fddb6a93586caef1328008a3ac5d.tar.gz
portage-7cba4cf96291fddb6a93586caef1328008a3ac5d.tar.bz2
portage-7cba4cf96291fddb6a93586caef1328008a3ac5d.zip
Use metadata.xml to print maintainer information in build.log
-rw-r--r--pym/_emerge/EbuildPhase.py12
1 files changed, 12 insertions, 0 deletions
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 = "<invalid metadata.xml>"
+
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)