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.
(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! :)
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).
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.
yup. Closing per lisa's argument. plus, turns out 00basic shouldn't be modified anywhere; there's an open bug on it elsewhere.
oops, wrong reso
meant reso wontfix, thousand apologies.
(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.
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.