Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 74569 - Gentoolkit equery uses misses some useflag descriptions
Summary: Gentoolkit equery uses misses some useflag descriptions
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-12-15 16:16 UTC by Mark Byers
Modified: 2006-01-17 19:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Byers 2004-12-15 16:16:37 UTC
equery uses misses out some use flag descriptions, for example 'equery uses qt'

Explanation:

1) The description for the flag immqt-bc in equery uses qt is missed because in the parsing of use.local.desc, this line is reached:

x11-libs/qt:immqt-bc - Enable binary compatible version of immodule for Qt

But the regexp used to match the line is: /usr/bin/equery line 462

catpkguse = re.search("([a-z]+-[a-z]+/.*):(.*)", fields[0]

Notice that the atom name can contain characters other than [a-z] (in this case 'x11-libs' contains a digit). The regexp needs to be modified to match all possible atom names.

For example:
catpkguse = re.search("([a-z0-9]+-[a-z0-9]+/.*):(.*)", fields[0]

or more simply:
catpkguse = re.search("(.*):(.*)", fields[0]

2) The flag immqt is missing because there is no space after the '-' on that line in the file /usr/portage/profiles/use.local.desc

x11-libs/qt:immqt -Enable binary incompatible version of immodule for Qt

This is perhaps a bug in the profile?

3) Searching the profile with the following command shows up 3 lines where ' - ' is not found. The other two are due to tabs instead of spaces just before the '-'.

$ grep -v '^#\| - ' /usr/portage/profiles/use.local.desc | cat -v

dev-libs/qsa:threads^I- enable thread support
media-video/mplayer:dts^I- Enables libdts (5.1 surround sound audio) support
x11-libs/qt:immqt -Enable binary incompatible version of immodule for Qt

(mplayer doesn't seem to use dts, so I don't even know why it's listed in use.local.desc - perhaps an older/newer version of mplayer does use dts.)

The ~x86 masked version qsa does use threads though:
$ equery uses qsa
 - - threads  : <unknown>
...

This can be fixed by modifying line 460 from:

fields = line.split(" - ")

to:

fields = re.split("[\t ]-[\t ]", line)

Now we get this:

$ equery uses qsa
 - - threads  : enable thread support
...

Similarly for line 448.

I have not tested this because I do not have the qsa package emerged.

4) While I'm writing a bug report anyway, I would like to point out a minor error in an error message that I noticed, on line 469:

                print_warn(5, "Could not load USE flag descriptions from " + path(gentoolkit.settings["PORTDIR"] + "/profiles/use.desc"))

should be "/profiles/use.local.desc"

Mark Byers.

Reproducible: Always
Steps to Reproduce:
1. equery uses qt

Actual Results:  
<snip>
 - - immqt    : <unknown>
 - - immqt-bc : <unknown>
 - - debug    : Tells configure and the makefiles to build for debugging.
Effects vary across packages, but generally it will at least add -g to CFLAGS.
Remember to set FEATURES=nostrip too


Expected Results:  
<snip>
 - - immqt    : Enable binary compatible version of immodule for Qt
 - - immqt-bc : Enable binary compatible version of immodule for Qt
 - - debug    : Tells configure and the makefiles to build for debugging.
Effects vary across packages, but generally it will at least add -g to CFLAGS.
Remember to set FEATURES=nostrip too
Comment 1 Paul Varner (RETIRED) gentoo-dev 2005-10-12 22:55:59 UTC
This will be fixed in gentoolkit-0.2.1
Comment 2 Paul Varner (RETIRED) gentoo-dev 2005-10-13 15:08:04 UTC
Fix is in subversion.
Comment 3 Paul Varner (RETIRED) gentoo-dev 2006-01-17 19:17:13 UTC
Fix is in gentoolkit-0.2.1