The distcc ebuild should add PATH and ROOTPATH variables to 02distcc e.g.: PATH="/usr/lib/distcc/bin" ROOTPATH="/usr/lib/distcc/bin" this enables the use of distcc with automake so you dont have to set it up manually. Reproducible: Always Steps to Reproduce:
Sidenote: If ccache creates a file 01ccache and puts in the same variables with the ccache paths, then even ccache will be used automatically.
Enlighten me a bit, What is this for? How does automake use ROOTPATH?
This is actually not limited to automake but works with pretty much anything that just calls 'gcc' (and c++, cc, g++ etc.) to do the compilation. But this is a really simple and clean method to make distcc work with almost everything that uses gcc. The PATH environment for the root user is in part defined by ROOTPATH and for the normal user by the PATH variable. env-update parses all the files within /etc/env.d and compiles the /etc/profile.env file in the order the files are numbered. So it parses /etc/env.d/02distcc before /etc/env.d/05gcc and therefore puts the real gcc path after the distcc path in the /etc/profile.env file. This one gets parsed by /etc/profile and depending on wether the user is 'root' or not, it uses either the PATH or the ROOTPATH variable to create the users final PATH environment variable. As noted in my comment after the feature request, i added the PATH and ROOTPATH variables (containing "/usr/lib/ccache/bin") for ccache by manually creating a file /etc/env.d/01ccache. So the final PATH variable for my root account on my machines looks like this: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/opt/bin:/usr/lib/ccache/bin:/usr/lib/distcc/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3 As expected, the gcc compiler is the last in the list. So if some "script" (or user or whatever) calls gcc, ccache gets executed first, which then executes distcc, which finally runs gcc as needed. This pretty much totally simplifies the whole installation process of distcc to just emerging it and it will work with everything that just calls 'gcc' (and also works transparently with ccache).
Markus? can you slide this in with the proposed rewrite in bug 70427? Thanks!
Fixed with version 1.3