diff options
author | Christian Goetze <cg@lindenlab.com> | 2009-05-14 21:20:37 +0000 |
---|---|---|
committer | Christian Goetze <cg@lindenlab.com> | 2009-05-14 21:20:37 +0000 |
commit | 0257214763203708e8e29d09346e777b95cdfce6 (patch) | |
tree | a624da09376d5c7e83d53143e893b09b13771b9d | |
parent | 65c86eadcb954b85bc40ea4ea8300d80c0927521 (diff) |
Set DISTCC_DIR to a location inside the source tree to avoid causing NFS trouble with the default setting.
-rwxr-xr-x | indra/develop.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/develop.py b/indra/develop.py index dfc658edec..90b665e8b1 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -370,26 +370,32 @@ class LinuxSetup(UnixSetup): cpus += m and int(m.group(1)) or 1 return hosts, cpus - def mk_distcc_hosts(basename, range): + def mk_distcc_hosts(basename, range, num_cpus): '''Generate a list of LL-internal machines to build on.''' loc_entry, cpus = localhost() hosts = [loc_entry] dead = [] stations = [s for s in xrange(range) if s not in dead] random.shuffle(stations) - hosts += ['%s%d.lindenlab.com/2,lzo' % (basename, s) for s in stations] + hosts += ['%s%d.lindenlab.com/%d,lzo' % (basename, s, num_cpus) for s in stations] cpus += 2 * len(stations) return ' '.join(hosts), cpus + if os.getenv('DISTCC_DIR') is None: + distcc_dir = os.path.join(getcwd(), '.distcc') + if not os.path.exists(distcc_dir): + os.mkdir(distcc_dir) + os.putenv('DISTCC_DIR', distcc_dir) + if job_count is None: hosts, job_count = count_distcc_hosts() if hosts == 1: hostname = socket.gethostname() if hostname.startswith('station'): - hosts, job_count = mk_distcc_hosts('station', 36) + hosts, job_count = mk_distcc_hosts('station', 36, 2) os.putenv('DISTCC_HOSTS', hosts) if hostname.startswith('eniac'): - hosts, job_count = mk_distcc_hosts('eniac', 71) + hosts, job_count = mk_distcc_hosts('eniac', 71, 2) os.putenv('DISTCC_HOSTS', hosts) if job_count > 12: job_count = 12; |