Update buck
$TMP, $DEPS, $SRCS, $OUT are no longer supplied by Buck in the
environment unless they appear in the command line. Pass $TMP
where it was assumed to be magically supplied. This allows steps
to continue to use buck-out/gen/ for temporary storage instead of
polluting the system /tmp.
Change-Id: Iea8380e5f93fa16ec77457eb76404832bde93a39
diff --git a/.buckversion b/.buckversion
index 7876c60..62fc368 100644
--- a/.buckversion
+++ b/.buckversion
@@ -1 +1 @@
-182669c0decd69f7fcd16add278eeb816bfc9890
+3fd3ea153c5444df2376de8ee87594a52a45bf52
diff --git a/lib/gwt/compiler.py b/lib/gwt/compiler.py
index 29a8609..32fd91c 100755
--- a/lib/gwt/compiler.py
+++ b/lib/gwt/compiler.py
@@ -16,14 +16,14 @@
from __future__ import print_function
from multiprocessing import cpu_count
-from os import environ, makedirs, mkdir, path
+from os import makedirs, mkdir, path
from subprocess import Popen, PIPE
from sys import argv, stderr
-cp, opt, end, TMP = [], [], False, environ['TMP']
-module, outzip = argv[1], argv[2]
+cp, opt, end = [], [], False
+module, TMP, outzip = argv[1], argv[2], argv[3]
-for a in argv[3:]:
+for a in argv[4:]:
if end:
if a.endswith('.jar'):
cp.append(path.expandvars(a))
diff --git a/tools/build.defs b/tools/build.defs
index 053d529..b62c850 100644
--- a/tools/build.defs
+++ b/tools/build.defs
@@ -38,7 +38,7 @@
context = [],
visibility = []
):
- cmd = ['$(exe //tools:pack_war)', '-o', '$OUT']
+ cmd = ['$(exe //tools:pack_war)', '-o', '$OUT', '--tmp', '$TMP']
for l in libs:
cmd.extend(['--lib', l])
for l in pgmlibs:
diff --git a/tools/default.defs b/tools/default.defs
index e7981dd..4ed5635 100644
--- a/tools/default.defs
+++ b/tools/default.defs
@@ -54,7 +54,7 @@
compiler_jvm_flags = [],
deps = [],
visibility = []):
- cmd = ['$(exe //lib/gwt:compiler)', module_target, '$OUT']
+ cmd = ['$(exe //lib/gwt:compiler)', module_target, '$TMP', '$OUT']
cmd += compiler_opts + ['--', '$DEPS']
genrule(
name = name,
diff --git a/tools/pack_war.py b/tools/pack_war.py
index 4ddd6e3..6c71d81 100755
--- a/tools/pack_war.py
+++ b/tools/pack_war.py
@@ -15,7 +15,7 @@
from __future__ import print_function
from optparse import OptionParser
-from os import environ, makedirs, path, symlink
+from os import makedirs, path, symlink
from subprocess import check_call
import sys
from util import check_output
@@ -24,9 +24,10 @@
opts.add_option('-o', help='path to write WAR to')
opts.add_option('--lib', action='append', help='target for WEB-INF/lib')
opts.add_option('--pgmlib', action='append', help='target for WEB-INF/pgm-lib')
+opts.add_option('--tmp', help='temporary directory')
args, ctx = opts.parse_args()
-war = environ['TMP']
+war = args.tmp
root = war[:war.index('buck-out')]
jars = set()
@@ -51,4 +52,4 @@
check_call(['zip', '-9qr', args.o, '.'], cwd = war)
except KeyboardInterrupt:
print('Interrupted by user', file=sys.stderr)
- exit(1)
\ No newline at end of file
+ exit(1)