View previous topic :: View next topic |
Author |
Message |
slick Bodhisattva
Joined: 20 Apr 2003 Posts: 3495
|
Posted: Fri May 07, 2010 6:42 am Post subject: make portage to save used gcc-version from each package |
|
|
First, sorry for my bad english.
Current versions from portage does not safe the gcc version a package is compiled with. There is a bug about this too, but i dont found the link at the moment.
I made me a small workaround. Surely not perfect, but works fine for me to found packages by used gcc version.
Create or edit /etc/portage/bashrc and add:
/etc/portage/bashrc wrote: | PORTAGE_CC_VERSION="`gcc --version | head -n1`" |
After merging new packages (or remerge existing) this information will safed in the /var/db/pkg/*/*/environment.bz2, so I can use it.
i.E.
Code: | bzcat /var/db/pkg/app-shells/bash-4.0_p37/environment.bz2 | grep PORTAGE_CC_VERSION |
give:
Quote: | declare -- PORTAGE_CC_VERSION="gcc (Gentoo 4.4.3 p1.0) 4.4.3" |
Now I can use this information to found/check/whatever packages by gcc version. (if the packages are (re-) merged after the changes in bashrc)
Short example to check kde:
Code: | for i in /var/db/pkg/kde-base/* ; do echo -n "`basename $i` :: " ; bzcat $i/environment.bz2 | grep PORTAGE_CC_VERSION | cut -d "\"" -f 2; done |
give:
Quote: | akonadi-4.3.5 :: gcc (Gentoo 4.4.3 p1.0) 4.4.3
akregator-4.3.5 :: gcc (Gentoo 4.4.3 p1.0) 4.4.3
... |
Is there a better code / solution? Please post. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|