Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(989)

Unified Diff: build/install-chroot.sh

Issue 637863002: Better handling of goma inside chroot environment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: put variables in quotes Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/install-chroot.sh
diff --git a/build/install-chroot.sh b/build/install-chroot.sh
index 2b523cba6ae44916fa3168ac898fb9d2c634f43b..ae97d539d054eef5681c3df16bd5f4dc9a60dd30 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}"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698