Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 151083 - non-portage compilation change to /etc/env.d/00basic has no effect
Summary: non-portage compilation change to /etc/env.d/00basic has no effect
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Other documents (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Docs Team
URL: http://www.gentoo.org/doc/en/handbook...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-12 16:04 UTC by Michael Ploujnikov
Modified: 2006-10-17 09:20 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 Michael Ploujnikov 2006-10-12 16:04:46 UTC
I was installing ccache according to:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=3#doc_chap3

After modifing my /etc/env.d/00basic to say:

PATH="/usr/lib/ccache/bin:/opt/bin"

I checked if everything was working with `which gcc` as a normal user and I got:

/usr/bin/gcc

rather than the expected

/usr/lib/ccache/bin/gcc

Then I noticed that the PATH didn't change properly:

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/lib/ccache/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.1:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin:/opt/vmware/server/bin:/sbin:/home/plouj/bin:/sbin:/home/plouj/bin

Then I stumbled upon /etc/profile which set the user's path like this:

PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"

and sure enough after changing /etc/profile to say:

PATH="/usr/lib/ccache/bin:/usr/local/bin:/usr/bin:/bin:${PATH}"

(I also reverted the changes in /etc/env.d/00basic)
I was able to use ccache as my normal user's compiler:

$ which gcc
/usr/lib/ccache/bin/gcc

I think, if I'm correct, the documentation should be fixed to reflect this. If I'm wrong, please let me know what's the proper way to setup ccache on a "global" scale for normal users. What's documented doesn't seem to work.
Comment 1 nm (RETIRED) gentoo-dev 2006-10-12 21:04:52 UTC
(In reply to comment #0)
Strange. Perhaps env-update && source /etc/profile (or at least source /etc/profile) is needed after changing PATH?

CCing lisa for some answers! :)
Comment 2 Michael Ploujnikov 2006-10-13 03:30:11 UTC
I didn't mention those steps (because I thought it was obvious).
What I actually did is env-update && source /etc/profile as root, plus I logged out of X, and out of my user's session, and logged back in. Then my path changed, but wrongly (like I mentioned originally).
Comment 3 Lisa Seelye (RETIRED) gentoo-dev 2006-10-16 19:07:45 UTC
Well the issue is that not everyone uses ccache and prefixing PATH with /usr/lib/ccache/bin will just be silly (why put it there by default?).

It is something which should be changed on an individual user basis.  The user is expected to change various files in /etc so why should /etc/profile be exempted?

I'd close this WONTFIX as it's up to the user to tailor their system's configuration from the sensible defaults.
Comment 4 nm (RETIRED) gentoo-dev 2006-10-16 19:09:05 UTC
yup. Closing per lisa's argument. plus, turns out 00basic shouldn't be modified anywhere; there's an open bug on it elsewhere.
Comment 5 nm (RETIRED) gentoo-dev 2006-10-16 19:09:34 UTC
oops, wrong reso
Comment 6 nm (RETIRED) gentoo-dev 2006-10-16 19:09:59 UTC
meant reso wontfix, thousand apologies.
Comment 7 Michael Ploujnikov 2006-10-17 08:02:16 UTC
(In reply to comment #3)
> Well the issue is that not everyone uses ccache and prefixing PATH with
> /usr/lib/ccache/bin will just be silly (why put it there by default?).
> 
> It is something which should be changed on an individual user basis.  The user
> is expected to change various files in /etc so why should /etc/profile be
> exempted?
> 
> I'd close this WONTFIX as it's up to the user to tailor their system's
> configuration from the sensible defaults.
> 

I think you are missing the point that this bug is a documentation bug. I'm not saying that the settings propsed should be default. I'm saying that what the documentation suggets to do on per-user basis is wrong, and the documentation should be changed.
Comment 8 nm (RETIRED) gentoo-dev 2006-10-17 09:20:40 UTC
Go back and re-read it again . . . it *was* changed. 00basic --> .bash_profile is the right way of doing things. otherwise baselayout clobbers the setup when using 00basic.