diff options
author | yyanagisawa <yyanagisawa@chromium.org> | 2014-10-09 00:18:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-09 07:18:35 +0000 |
commit | 53d0973ee890273cd78fd657556907dc0a91d2dc (patch) | |
tree | 1e66642b267d5f2afe071cd65ea1861a710f0c33 /build/install-chroot.sh | |
parent | 3473f2aabb77a12ad3d01ab0805438c920526d49 (diff) | |
download | chromium_src-53d0973ee890273cd78fd657556907dc0a91d2dc.zip chromium_src-53d0973ee890273cd78fd657556907dc0a91d2dc.tar.gz chromium_src-53d0973ee890273cd78fd657556907dc0a91d2dc.tar.bz2 |
Better handling of goma inside chroot environment.
/tmp is shared between inside and outside of chroot. It confuses
goma client. To avoid such a confusion, make goma use different
temporary directory from external world.
BUG=409482
Review URL: https://codereview.chromium.org/637863002
Cr-Commit-Position: refs/heads/master@{#298822}
Diffstat (limited to 'build/install-chroot.sh')
-rwxr-xr-x | build/install-chroot.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/build/install-chroot.sh b/build/install-chroot.sh index 2b523cb..ae97d53 100755 --- a/build/install-chroot.sh +++ b/build/install-chroot.sh @@ -504,6 +504,10 @@ done session="$(schroot -c "${chroot}" -b)" export CHROOT_SESSION_ID="${session}" +# Set GOMA_TMP_DIR for better handling of goma inside chroot. +export GOMA_TMP_DIR="/tmp/goma_tmp_$CHROOT_SESSION_ID" +mkdir -p "$GOMA_TMP_DIR" + if [ $# -eq 0 ]; then # Run an interactive shell session schroot -c "${session}" -r -p @@ -554,6 +558,8 @@ done # clean up the stale files by invoking us with "--clean" after having killed # all running processes. schroot -c "${session}" -e +# Since no goma processes are running, we can remove goma directory. +rm -rf "$GOMA_TMP_DIR" exit $rc EOF sudo chown root:root /usr/local/bin/"${target%bit}" |