1 |
Author: betelgeuse |
2 |
Date: 2008-11-27 13:52:01 +0000 (Thu, 27 Nov 2008) |
3 |
New Revision: 524 |
4 |
|
5 |
Modified: |
6 |
trunk/src/equery/equery |
7 |
Log: |
8 |
Add support for showing USE_EXPAND variables. Patch from Michael A. Smith <michael@××××××××.com>. Fixes bug #238005. |
9 |
|
10 |
Modified: trunk/src/equery/equery |
11 |
=================================================================== |
12 |
--- trunk/src/equery/equery 2008-11-26 19:42:41 UTC (rev 523) |
13 |
+++ trunk/src/equery/equery 2008-11-27 13:52:01 UTC (rev 524) |
14 |
@@ -17,6 +17,7 @@ |
15 |
import re |
16 |
import sys |
17 |
import time |
18 |
+from glob import glob |
19 |
|
20 |
# portage (output module) and gentoolkit need special path modifications |
21 |
sys.path.insert(0, "/usr/lib/gentoolkit/pym") |
22 |
@@ -534,6 +535,17 @@ |
23 |
# for all files in gentoolkit.settings["PORTDIR"]+"/desc/*.desc |
24 |
# variable name = <filename>_<field1> |
25 |
# description = <field 2> |
26 |
+ for descfile in glob(gentoolkit.settings["PORTDIR"]+"/profiles/desc/*.desc"): |
27 |
+ try: |
28 |
+ fd = open(descfile) |
29 |
+ for line in fd.readlines(): |
30 |
+ if line[0] == "#": |
31 |
+ continue |
32 |
+ fields = [field.strip() for field in line.split(" - ", 1)] |
33 |
+ if len(fields) == 2: |
34 |
+ usedesc["%s_%s" % (descfile.split("/")[-1][0:-5], fields[0],)] = fields[1] |
35 |
+ except IOError: |
36 |
+ print_warn(5, "Could not load USE flag descriptions from " + descfile) |
37 |
|
38 |
# Load local USE flag descriptions |
39 |
try: |