From: Brian Dolbec Date: Fri, 18 Mar 2011 02:01:59 +0000 (-0700) Subject: add the Homepage to epkginfo/equery meta's Upstream option as per idl0r's request. X-Git-Tag: gentoolkit-0.3.0~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=99f70f24a8c61aac3226a038c0b1832aa7b93746;p=gentoolkit.git add the Homepage to epkginfo/equery meta's Upstream option as per idl0r's request. --- diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py index b67cbc6..01e090a 100644 --- a/pym/gentoolkit/equery/meta.py +++ b/pym/gentoolkit/equery/meta.py @@ -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()