[distcc] Monitor programs do not work with Portage/Gentoo Linux

Lisa M. lisa at thedoh.com
Tue Jun 17 18:07:22 GMT 2003


Hi.

While testing distcc 2.7 for Gentoo[2] I discovered that the dependency
on the envvar $TMPDIR is incompatible with Portage.  This
incompatibility is due to the fact that $TMPDIR (and $TMP) envvars are
redefined prior to compilation so as to work with the "sandbox" that
portage uses to compile packages.

The solution to this is to use a different envvar (in the patch I
submitted[1] to Gentoo in an ebuild revision) I use $DISTCC_TMPDIR. 
This seems to be more in the spirit of the Distcc-esque environmental
variables (distcc_verbose, distcc_hosts, etc).

A patch to tempfile.c was the easy fix (see attached).

[1]: http://bugs.gentoo.org/show_bug.cgi?id=23006
[2]: Gentoo is: http://www.gentoo.org

-- 
Regards,
-Lisa
<Vix ulla tam iniqua pax, quin bello vel aequissimo sit potior>
-------------- next part --------------
--- tempfile.c.dist	2003-06-17 11:44:26.000000000 -0400
+++ tempfile.c	2003-06-17 11:44:40.000000000 -0400
@@ -88,7 +88,7 @@
 {
     const char *d;
 
-    d = getenv("TMPDIR");
+    d = getenv("DISTCC_TMPDIR");
     /* some sanity checks */
     if (!d || d[0] == '\0' || d[0] != '/' || d[1] == '\0') {
         return "/tmp";


More information about the distcc mailing list