From 296f41a4ac4ba05f6812e09d4b91c70535a9ce86 Mon Sep 17 00:00:00 2001 From: Tobias Heinlein Date: Sat, 19 Apr 2014 18:39:03 +0200 Subject: [PATCH] equery: Don't always print the license field. Signed-off-by: Tobias Heinlein --- pym/gentoolkit/equery/meta.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py index e2d2124..d3342cd 100644 --- a/pym/gentoolkit/equery/meta.py +++ b/pym/gentoolkit/equery/meta.py @@ -373,12 +373,13 @@ def call_format_functions(best_match, matches): useflags = format_useflags(best_match.metadata.use()) print_sequence(format_list(useflags)) - _license = best_match.environment(["LICENSE"]) - if QUERY_OPTS["license"]: - _license = format_list(_license) - else: - _license = format_list(_license, "License: ", " " * 13) - print_sequence(_license) + if QUERY_OPTS["license"] or not got_opts: + _license = best_match.environment(["LICENSE"]) + if QUERY_OPTS["license"]: + _license = format_list(_license) + else: + _license = format_list(_license, "License: ", " " * 13) + print_sequence(_license) if QUERY_OPTS["stablereq"]: # Get {: [u'ia64', u'm68k', ...], ...} -- 1.8.5.2