add the Homepage to epkginfo/equery meta's Upstream option as per idl0r's request.
authorBrian Dolbec <brian.dolbec@gmail.com>
Fri, 18 Mar 2011 02:01:59 +0000 (19:01 -0700)
committerBrian Dolbec <brian.dolbec@gmail.com>
Fri, 18 Mar 2011 02:01:59 +0000 (19:01 -0700)
pym/gentoolkit/equery/meta.py

index b67cbc6db8792421979981e5a8149c3a0702f99a..01e090a4d548a2f03ec9970deaea6624a7a7b08b 100644 (file)
@@ -244,6 +244,14 @@ def format_keywords_line(pkg, fmtd_keywords, slot, verstr_len):
        return result
 
 
+def format_homepage(homepage):
+       """format the homepage(s) entries for dispaly"""
+       result = []
+       for page in homepage.split():
+               result.append(format_line(page, "Homepage:    ", " " * 13))
+       return result
+
+
 # R0912: *Too many branches (%s/%s)*
 # pylint: disable-msg=R0912
 def call_format_functions(best_match, matches):
@@ -284,11 +292,13 @@ def call_format_functions(best_match, matches):
 
        if QUERY_OPTS["upstream"] or not got_opts:
                upstream = format_upstream(best_match.metadata.upstream())
+               homepage = format_homepage(best_match.environment("HOMEPAGE"))
                if QUERY_OPTS["upstream"]:
                        upstream = format_list(upstream)
                else:
                        upstream = format_list(upstream, "Upstream:    ", " " * 13)
                print_sequence(upstream)
+               print_sequence(homepage)
 
        if not got_opts:
                pkg_loc = best_match.package_path()