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
This commit is contained in:
Shawn Pearce
2013-10-17 20:29:05 -07:00
parent 364dfaf7d7
commit 55583ac43e
5 changed files with 11 additions and 10 deletions

View File

@@ -1 +1 @@
182669c0decd69f7fcd16add278eeb816bfc9890 3fd3ea153c5444df2376de8ee87594a52a45bf52

View File

@@ -16,14 +16,14 @@
from __future__ import print_function from __future__ import print_function
from multiprocessing import cpu_count from multiprocessing import cpu_count
from os import environ, makedirs, mkdir, path from os import makedirs, mkdir, path
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
from sys import argv, stderr from sys import argv, stderr
cp, opt, end, TMP = [], [], False, environ['TMP'] cp, opt, end = [], [], False
module, outzip = argv[1], argv[2] module, TMP, outzip = argv[1], argv[2], argv[3]
for a in argv[3:]: for a in argv[4:]:
if end: if end:
if a.endswith('.jar'): if a.endswith('.jar'):
cp.append(path.expandvars(a)) cp.append(path.expandvars(a))

View File

@@ -38,7 +38,7 @@ def war(
context = [], context = [],
visibility = [] visibility = []
): ):
cmd = ['$(exe //tools:pack_war)', '-o', '$OUT'] cmd = ['$(exe //tools:pack_war)', '-o', '$OUT', '--tmp', '$TMP']
for l in libs: for l in libs:
cmd.extend(['--lib', l]) cmd.extend(['--lib', l])
for l in pgmlibs: for l in pgmlibs:

View File

@@ -54,7 +54,7 @@ def gwt_application(
compiler_jvm_flags = [], compiler_jvm_flags = [],
deps = [], deps = [],
visibility = []): visibility = []):
cmd = ['$(exe //lib/gwt:compiler)', module_target, '$OUT'] cmd = ['$(exe //lib/gwt:compiler)', module_target, '$TMP', '$OUT']
cmd += compiler_opts + ['--', '$DEPS'] cmd += compiler_opts + ['--', '$DEPS']
genrule( genrule(
name = name, name = name,

View File

@@ -15,7 +15,7 @@
from __future__ import print_function from __future__ import print_function
from optparse import OptionParser from optparse import OptionParser
from os import environ, makedirs, path, symlink from os import makedirs, path, symlink
from subprocess import check_call from subprocess import check_call
import sys import sys
from util import check_output from util import check_output
@@ -24,9 +24,10 @@ opts = OptionParser()
opts.add_option('-o', help='path to write WAR to') 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('--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('--pgmlib', action='append', help='target for WEB-INF/pgm-lib')
opts.add_option('--tmp', help='temporary directory')
args, ctx = opts.parse_args() args, ctx = opts.parse_args()
war = environ['TMP'] war = args.tmp
root = war[:war.index('buck-out')] root = war[:war.index('buck-out')]
jars = set() jars = set()