Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96779 - Request equery/portage to maintain more queriable info on installed packages
Summary: Request equery/portage to maintain more queriable info on installed packages
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks: 346443
  Show dependency tree
 
Reported: 2005-06-22 05:28 UTC by Shaun Crampton
Modified: 2011-06-15 05:35 UTC (History)
2 users (show)

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 Shaun Crampton 2005-06-22 05:28:19 UTC
I'd like it if portage recorded all the various directives in place when a
package is installed eg. adding a --new-cflags --new-linguas etc option (My own
reason is that I tried some experimental cflags for a few days and now I don't
know which packages are compiled with which + I want to remove all experimental
packages).

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-06-22 17:45:31 UTC
See /var/portage/db/package-category/package-name/
Comment 2 Colin Kingsley (RETIRED) gentoo-dev 2005-06-22 18:09:48 UTC
I think what Jakub meant to say was /var/db/pkg/<category>/<pacakge>
Comment 3 Shaun Crampton 2005-06-25 05:46:52 UTC
thanks -- that's really helpful

-Shaun
Comment 4 Paul Varner (RETIRED) gentoo-dev 2006-12-12 14:56:32 UTC
The support for this is already in the gentoolkit libraries.  I will look at adding equery commands to query this information.
Comment 5 Douglas Anderson 2009-02-19 09:30:35 UTC
(In reply to comment #4)
> The support for this is already in the gentoolkit libraries.  I will look at
> adding equery commands to query this information.
> 

Paul, what support were you referring to in gentoolkit? How and what were you planning to do here? Give me some details and I'll hack on it, or let's close this bug down :)
Comment 6 Paul Varner (RETIRED) gentoo-dev 2009-02-19 15:55:41 UTC
gentoolkit.Package.get_env_var is the function you are looking for:

Python 2.5.4 (r254:67916, Jan 26 2009, 17:20:47)
[GCC 4.1.2 (Gentoo 4.1.2 p1.1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.insert(0, "/usr/lib/gentoolkit/pym")
>>> import gentoolkit
>>> p = gentoolkit.Package('sys-devel/gcc-4.1.2')
>>> p.get_env_var('CFLAGS')
'-O2 -march=k8 -pipe'
>>> p.get_env_var('DESCRIPTION')
'The GNU Compiler Collection. Includes C/C++, java compilers, pie+ssp extensions, Haj Ten Brugge runtime bounds checking'
>>> p.get_env_var('EAPI')
'0'

I have just never implemented more queries for the information.
Comment 7 Paul Varner (RETIRED) gentoo-dev 2011-06-15 05:35:29 UTC
Let's target this in 0.3.1.  The support already exists with 'equery has' in gentoolkit-0.3.0.4, but it isn't fully documented and we might decide to come up with some changes on how it works.

Here is an example of querying for CFLAGS:

$ equery has CFLAGS --package gcc
-O2 -march=k8 -pipe