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.
See /var/portage/db/package-category/package-name/
I think what Jakub meant to say was /var/db/pkg/<category>/<pacakge>
thanks -- that's really helpful -Shaun
The support for this is already in the gentoolkit libraries. I will look at adding equery commands to query this information.
(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 :)
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.
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