Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 53196 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]
[patch]
equery--portage_use_desc.patch
equery--portage_use_desc.patch (text/plain), 3.13 KB, created by
TGL
on 2005-03-11 10:54:19 UTC
(
hide
)
Description:
equery--portage_use_desc.patch
Filename:
MIME Type:
Creator:
TGL
Created:
2005-03-11 10:54:19 UTC
Size:
3.13 KB
patch
obsolete
>--- equery.orig 2005-03-11 18:04:40.000000000 +0100 >+++ equery 2005-03-11 18:19:10.000000000 +0100 >@@ -27,6 +27,7 @@ > import gentoolkit > import portage > import portage_checksum >+import portage_use_desc > > import gentoolkit.pprinter as pp > from gentoolkit.pprinter import print_info, print_error, print_warn, die >@@ -435,38 +436,13 @@ > > > useflags = gentoolkit.settings["USE"].split() >- usedesc = {} >- uselocaldesc = {} > >- # Load global USE flag descriptions >+ # Load USE flag descriptions >+ use_desc=None > try: >- fd = open(gentoolkit.settings["PORTDIR"]+"/profiles/use.desc") >- usedesc = {} >- for line in fd.readlines(): >- if line[0] == "#": >- continue >- fields = line.split(" - ") >- if len(fields) == 2: >- usedesc[fields[0].strip()] = fields[1].strip() >- except IOError: >- print_warn(5, "Could not load USE flag descriptions from " + ppath(gentoolkit.settings["PORTDIR"] + "/profiles/use.desc")) >- >- # Load local USE flag descriptions >- try: >- fd = open(gentoolkit.settings["PORTDIR"]+"/profiles/use.local.desc") >- for line in fd.readlines(): >- if line[0] == "#": >- continue >- fields = line.split(" - ") >- if len(fields) == 2: >- catpkguse = re.search("([a-z]+-[a-z]+/.*):(.*)", fields[0]) >- if catpkguse: >- if not uselocaldesc.has_key(catpkguse.group(1).strip()): >- uselocaldesc[catpkguse.group(1).strip()] = {catpkguse.group(2).strip() : fields[1].strip()} >- else: >- uselocaldesc[catpkguse.group(1).strip()][catpkguse.group(2).strip()] = fields[1].strip() >- except IOError: >- print_warn(5, "Could not load USE flag descriptions from " + path(gentoolkit.settings["PORTDIR"] + "/profiles/use.desc")) >+ use_desc=portage_use_desc.use_desc(gentoolkit.settings["PORTDIR"]) >+ except: >+ print_warn("Could not load USE flag descriptions from " + gentoolkit.settings["PORTDIR"] + "/profiles/use.[local.]desc") > > if not Config["piping"]: > print_info(3, "[ Colour Code : " + pp.useflagon("set") + " " + pp.useflagoff("unset") + " ]") >@@ -500,16 +476,17 @@ > # store (inuse, inused, flag, desc) > output = [] > >+ use_desc_dict={} >+ if use_desc: >+ use_desc_dict=use_desc.get_pkg_flags_desc(usevar,p.get_category()+"/"+p.get_name()) >+ > for u in usevar: > inuse = 0 > inused = 0 > try: >- desc = usedesc[u] >+ desc = use_desc_dict[u] > except KeyError: >- try: >- desc = uselocaldesc[p.get_category() + "/" + p.get_name()][u] >- except KeyError: >- desc = "" >+ desc = "" > > if u in p.get_settings("USE"): > inuse = 1
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 84884
:
53193
|
53194
|
53195
|
53196
|
53197
|
53198
|
71423
|
71424
|
71425
|
71426
|
71427
|
71428
|
81282