cNoNim / distcc

Automatically exported from code.google.com/p/distcc
GNU General Public License v2.0
0 stars 1 forks source link

disable distcc #140

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
== enhancement suggestion ==
Use case:

My distcc servers are accessed from my laptop via VPN. Sometime I want to 
compile, but servers on my laptop are not accessible because VPN is not 
working. compile process deals with time-outs, which is annoying.

I would like to quickly disable and enable distcc.

This is a small patch that works for me very well:

In file compile.c in line 514 after the following code segment:

    if (sg_level) /* Recursive distcc - run locally, and skip all locking. */
        goto run_local;

add the following lines:

    if (dcc_getenv_bool("DISTCC_DISABLE", 0))
        {
            rs_log_warning("DISTCC_DISABLE found; ignore distcc and compile locally. To undo: <unset DISTCC_DISABLE>");
            goto run_local;
        }

I suggest to add this to the code.

-- Andreas

Original issue reported on code.google.com by climbera...@gmail.com on 24 Mar 2014 at 3:28

GoogleCodeExporter commented 9 years ago
Have you tried setting DISTCC_HOSTS=localhost?
That should have a pretty similar effect, I think.

Original comment by fergus.h...@gmail.com on 24 Mar 2014 at 3:34

GoogleCodeExporter commented 9 years ago
What would happen if compilation fails when DISTCC_HOSTS=localhost?  Is that a 
special case and handled differently from remote distcc servers (remote builds 
that fail will build locally) or would it compile anything that fails twice 
locally?

Original comment by jim.k...@simplivt.com on 12 May 2014 at 8:45

GoogleCodeExporter commented 9 years ago
localhost is treated as a special case; distcc knows that this is a local 
compilation, and doesn't go through the distributed compilation code paths in 
that case.

Original comment by fergus.h...@gmail.com on 13 May 2014 at 1:42