diff options
| author | betelgeuse <betelgeuse@gentoo.org> | 2008-11-27 13:52:01 +0000 |
|---|---|---|
| committer | betelgeuse <betelgeuse@gentoo.org> | 2008-11-27 13:52:01 +0000 |
| commit | 1fb987e7e76b1e13c40e767cda2060525917fd52 (patch) | |
| tree | c2d2f79c251c83661470dee82870df2dea2da78c /trunk | |
| parent | 38571037f6320bfefc2007ec68c5ac070d70f00f (diff) | |
| download | gentoolkit-1fb987e7e76b1e13c40e767cda2060525917fd52.tar.gz | |
Add support for showing USE_EXPAND variables. Patch from Michael A. Smith <michael@smith-li.com>. Fixes bug #238005.
svn path=/; revision=524
Diffstat (limited to 'trunk')
| -rwxr-xr-x | trunk/src/equery/equery | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery index b1bc730..a1239d9 100755 --- a/trunk/src/equery/equery +++ b/trunk/src/equery/equery @@ -17,6 +17,7 @@ import os import re import sys import time +from glob import glob # portage (output module) and gentoolkit need special path modifications sys.path.insert(0, "/usr/lib/gentoolkit/pym") @@ -534,6 +535,17 @@ class CmdDisplayUSEs(Command): # for all files in gentoolkit.settings["PORTDIR"]+"/desc/*.desc # variable name = <filename>_<field1> # description = <field 2> + for descfile in glob(gentoolkit.settings["PORTDIR"]+"/profiles/desc/*.desc"): + try: + fd = open(descfile) + for line in fd.readlines(): + if line[0] == "#": + continue + fields = [field.strip() for field in line.split(" - ", 1)] + if len(fields) == 2: + usedesc["%s_%s" % (descfile.split("/")[-1][0:-5], fields[0],)] = fields[1] + except IOError: + print_warn(5, "Could not load USE flag descriptions from " + descfile) # Load local USE flag descriptions try: |
