Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
make portage to save used gcc-version from each package
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3495

PostPosted: Fri May 07, 2010 6:42 am    Post subject: make portage to save used gcc-version from each package Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
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