1 |
I have a RAID array which gets moved between a few different hardware |
2 |
environments. |
3 |
At the moment it is in an athlon-xp, but has previously been in an |
4 |
athlon and an i686. |
5 |
|
6 |
As a result, the installed packages have varied CFLAGS depending on |
7 |
when I installed or upgraded them last. |
8 |
|
9 |
I was poking around portage and gentoolkit and asking around on |
10 |
#gentoo for a way to determine what an installed package's CFLAGS was |
11 |
but no-one could help me. |
12 |
|
13 |
I ended up finding /var/db/pkg/$category/$package/CFLAGS |
14 |
and hacked this bit of perl to list all installed packages and their CFLAGS: |
15 |
|
16 |
open PKGS, "find /var/db/pkg/ -type f -name CFLAGS|"; |
17 |
while ($filename = <PKGS>) |
18 |
{ |
19 |
($_,$_,$_,$_,$cat,$pkg,$_) = split /\//,$filename; |
20 |
print "=$cat/$pkg => ".`cat $filename`; |
21 |
} |
22 |
|
23 |
This info can save you having to do an emerge -e world unneccessarily. |
24 |
|
25 |
It would be nice to have an equivalent emerge's --newuse option, but for CFLAGS |
26 |
. Could the portage devs please consider this as a feature request? |
27 |
... or can portage already do this somehow? |
28 |
|
29 |
Regards, |
30 |
Neil. |
31 |
|
32 |
-- |
33 |
gentoo-dev@g.o mailing list |