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}" |