summaryrefslogtreecommitdiff
path: root/app-portage/gentoolkit/files/0.3.0.9-equery-508114.patch
blob: 3fc67d3665458fd94baa164df34b3f9ea61b9f3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 9a33ceffe2e0045bf75b1209a90e9a53530d4e0d Mon Sep 17 00:00:00 2001
From: Tobias Heinlein <keytoaster@gentoo.org>
Date: Sat, 19 Apr 2014 18:39:03 +0200
Subject: [PATCH 01/14] equery: Don't always print the license field (bug
 #508114).

---
 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 {<Package 'dev-libs/glib-2.20.5'>: [u'ia64', u'm68k', ...], ...}
-- 
2.1.3