Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 71428 Details for
Bug 84884
[PATCH] Misc. use.[local.]desc enhancements
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
bin/use_desc_checker
use_desc_checker (text/plain), 1.90 KB, created by
TGL
on 2005-10-25 10:07:33 UTC
(
hide
)
Description:
bin/use_desc_checker
Filename:
MIME Type:
Creator:
TGL
Created:
2005-10-25 10:07:33 UTC
Size:
1.90 KB
patch
obsolete
>#!/usr/bin/python > >import sys,getopt,string >from types import * >sys.path.insert(0, "/usr/lib/portage/pym") >from portage import settings >import portage_use_desc >from output import * > >use_desc = None > >def load_use_desc(): > global use_desc > try: use_desc = portage_use_desc.use_desc(settings["PORTDIR"]) > except: > print >>sys.stderr, "Error: failed to load" \ > + " use.[local.]desc from %s" % settings["PORTDIR"] > sys.exit(1) > >def print_dict(dict): > global use_desc > myflagkeys = dict.keys() > myflagkeys.sort() > for flag in myflagkeys: > if flag in use_desc.desc: > print teal(flag),"-",use_desc.desc[flag] > else: > print teal(flag) > mypkgkeys=dict[flag].keys() > mypkgkeys.sort() > for pkg in mypkgkeys: > print " ",darkgreen(pkg),"-",use_desc.local_desc[pkg][flag] > print > >def check_special(): > global use_desc > if not use_desc: load_use_desc() > mydict = use_desc.get_all_special_flags() > if mydict: > print > print blue("These are local USE flags which also have a global description:") > print > print_dict(mydict) > >def check_multiple(mult): > global use_desc > if not use_desc: load_use_desc() > mydict = use_desc.get_multiple_local_flags(mult) > if mydict: > print > print blue("These are local USE flags which are used more than %d times:"%mult) > print > print_dict(mydict) > >def print_help(out=sys.stdout): > print >>out, \ >"""Usage: use_desc_checker <option> > >Options: > -m N, --multiple=N report local flags which occurs at least N times > -s, --special report local flags which also have a global definition > -h, --help display this help message""" > >try: > opts, args = getopt.getopt(sys.argv[1:], "sm::h", ["special", "multiple=", "help"]) > if not opts: raise Exception() >except: > print_help(sys.stderr) > sys.exit(2) > >for o, a in opts: > if o in ("-s", "--special"): > check_special() > elif o in ("-m", "--multiple"): > check_multiple(string.atoi(a)) > elif o in ("-h","--help"): > print_help() > >sys.exit(0)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 84884
:
53193
|
53194
|
53195
|
53196
|
53197
|
53198
|
71423
|
71424
|
71425
|
71426
|
71427
| 71428 |
81282