update_chroot: Call ensure_bootstrap
To be able to emerge chromeos-chrome, the cros chroot needs to make
sure that depot_tools has already downloaded some binaries,
otherwise, emerging chromeos-chrome would fail with a sandbox
error that does not really tell the developer how to fix the issue.
Calling ensure_bootstrap in update_chroot should do the trick.
BUG=chromium:770508, chromium:936151
TEST=cros_sdk --chrome_root=$CHROME_ROOT
rm -rf /mnt/host/depot_tools/.cipd*
./update_chroot
CHROME_ORIGIN=LOCAL_SOURCE emerge-$BOARD chromeos-chrome
cd ~/chrome_root/src/third_party/depot_tools; git status
=> no change
Change-Id: I7aebb6dd3f0b4bce9650a3a23943a6ce88c3689f
Reviewed-on: https://chromium-review.googlesource.com/803196
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit 03a6305ffc8128a8a48b0e6e5c0a794e1a46d2ba)
Reviewed-on: https://chromium-review.googlesource.com/c/1489877
Commit-Queue: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
diff --git a/update_chroot b/update_chroot
index 77d5e4c..028b801 100755
--- a/update_chroot
+++ b/update_chroot
@@ -85,6 +85,10 @@
sudo -E $(type -p cros_setup_toolchains) "${TOOLCHAIN_FLAGS[@]}"
fi
+# Make sure depot_tools is bootstrapped, so that it can build chromeos-chrome.
+info "Bootstrapping depot_tools"
+ensure_bootstrap
+
info "Updating the SDK"
# Perform an update of all the sdk packages in the chroot.