Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54282 - gcc-config does not tell about source /etc/profile
Summary: gcc-config does not tell about source /etc/profile
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: PPC All
: High normal (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-18 00:52 UTC by Lars Weiler (RETIRED)
Modified: 2004-06-19 10:55 UTC (History)
0 users

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 Lars Weiler (RETIRED) gentoo-dev 2004-06-18 00:52:56 UTC
I recently installed gcc-3.4.0.  After that I called gcc-config powerpc-unknown-linux-gnu-3.4.0 -- but didn't sourced /etc/profile as gcc-config didn't told me so:

celeborn root # gcc-config powerpc-unknown-linux-gnu-3.4.0
 * Switching to powerpc-unknown-linux-gnu-3.4.0 compiler...                                                              [ ok ]
celeborn root # gcc --version
gcc (GCC) 3.3.3 (Gentoo Linux 3.3.3_pre20040408-r1)

First after switching the profile back to 3.3.3, it showed that I have to update the profile:

celeborn root # gcc-config powerpc-unknown-linux-gnu-3.3.3
 * Switching to powerpc-unknown-linux-gnu-3.3.3 compiler...                                                              [ ok ]

 * If you intend to use the gcc from the new profile in an already
 * running shell, please remember to do:

 *   # source /etc/profile

celeborn root # source /etc/profile
celeborn root # gcc-config powerpc-unknown-linux-gnu-3.4.0
 * Switching to powerpc-unknown-linux-gnu-3.4.0 compiler...                                                              [ ok ]

 * If you intend to use the gcc from the new profile in an already
 * running shell, please remember to do:

 *   # source /etc/profile

celeborn root # gcc --version
gcc (GCC) 3.4.0 20040601 (Gentoo Linux 3.4.0-r6, ssp-3.4-2, pie-8.7.6.3)


A small problem I guess, but that could be annoying to users.
Comment 1 SpanKY gentoo-dev 2004-06-18 08:46:11 UTC
i'm going to guess and say that this is because when you finished emerging
gcc it ran `gcc-config` for you to the new 3.4.0
Comment 2 Lars Weiler (RETIRED) gentoo-dev 2004-06-18 11:40:24 UTC
This could be true, although /usr/bin/gcc --version showed that this is gcc-3.3.3.  Probably gcc-config ran, but source /etc/profile has not been called (and the einfo does not tell about that, too).
Comment 3 SpanKY gentoo-dev 2004-06-18 18:29:20 UTC
that's because *you* have to call `source /etc/profile` ... there is no way (that i know of) to push environment changes into a shell without the user doing it

the einfo to tell you to `source /etc/profile` was probably lost at the end of the emerge ... in other words, perhaps this is really just a dupe of the portage einfo logging bug
Comment 4 Lars Weiler (RETIRED) gentoo-dev 2004-06-18 18:42:32 UTC
Nope, initially I didn't hat the intension for "I have just one more comment about emerge logging".  And if you had looked into the gcc-3.4-ebuild you would knew that there is no information about calling `source /etc/profile` manually.

Nevertheless, as nobody will take care for it and probably more users will send bugs as soon as gcc-3.4 becomes stable, I will resolve this bug as worksforme during the meantime.
Comment 5 SpanKY gentoo-dev 2004-06-18 18:52:06 UTC
i know theres no info about 'source /etc/profile' in the ebuild

it's because the ebuild calls gcc-config which should print out the info about sourcing /etc/profile
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2004-06-19 10:55:21 UTC
In pkg_postinst(), which should be last thing you see after its been merged
if I am not mistaken ...