summaryrefslogtreecommitdiffstats
path: root/pym/portage/xml
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2010-12-29 14:37:25 +0100
committerZac Medico <zmedico@gentoo.org>2010-12-29 09:54:11 -0800
commitf5069517b6ecebc5c25aaf7cf80922bed6d8e62c (patch)
tree7795f3f33761ef8f6f364ecc62aaead355f54392 /pym/portage/xml
parent8d42d71c7e4609ea2332a8189ef1c63357f1b771 (diff)
downloadportage-f5069517b6ecebc5c25aaf7cf80922bed6d8e62c.tar.gz
portage-f5069517b6ecebc5c25aaf7cf80922bed6d8e62c.tar.bz2
portage-f5069517b6ecebc5c25aaf7cf80922bed6d8e62c.zip
EbuildPhase: Display upstream info before setup.
Display upstream maintainers and bugtrackers along with Gentoo maintainers when emerging a package.
Diffstat (limited to 'pym/portage/xml')
-rw-r--r--pym/portage/xml/metadata.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/pym/portage/xml/metadata.py b/pym/portage/xml/metadata.py
index 2d62bba99..326a468b3 100644
--- a/pym/portage/xml/metadata.py
+++ b/pym/portage/xml/metadata.py
@@ -348,3 +348,29 @@ class MetaDataXML(object):
maint_str += " " + ",".join(maintainers)
return maint_str
+
+ def format_upstream_string(self):
+ """Format string containing upstream maintainers and bugtrackers.
+ Used by emerge to display upstream information.
+
+ @rtype: String
+ @return: a string containing upstream maintainers and bugtrackers
+ """
+ maintainers = []
+ for upstream in self.upstream():
+ for maintainer in upstream.maintainers:
+ if maintainer.email is None or not maintainer.email.strip():
+ if maintainer.name and maintainer.name.strip():
+ maintainers.append(maintainer.name)
+ else:
+ maintainers.append(maintainer.email)
+
+ for bugtracker in upstream.bugtrackers:
+ if bugtracker.startswith("mailto:"):
+ bugtracker = bugtracker[7:]
+ maintainers.append(bugtracker)
+
+
+ maintainers = list(unique_everseen(maintainers))
+ maint_str = " ".join(maintainers)
+ return maint_str