mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
make_chroot: do all the git bootstrapping before gcc
Explicitly build curl/openssl/git since the toolchain itself tries to fetch over http with git. BUG=None TEST=`cros_sdk --bootstrap` works TEST=`cbuildbot chromiumos-sdk` works Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84 Reviewed-on: https://gerrit.chromium.org/gerrit/36995 Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Han Shen <shenhan@chromium.org> Tested-by: Han Shen <shenhan@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
1d107dc1f7
commit
96c5c1c659
@ -426,15 +426,27 @@ early_enter_chroot emerge -uNv --quiet portage
|
||||
# Packages that inherit cros-workon commonly get a circular dependency
|
||||
# curl->openssl->git->curl that is broken by emerging an early version of git
|
||||
# without curl (and webdav that depends on it).
|
||||
need_git_rebuild=${FLAGS_FALSE}
|
||||
# We also need to do this before the toolchain as those will sometimes also
|
||||
# fetch via remote git trees (for some bot configs).
|
||||
if [[ ! -e "${FLAGS_chroot}/usr/bin/git" ]]; then
|
||||
need_git_rebuild=${FLAGS_TRUE}
|
||||
info "Updating early git"
|
||||
USE="-curl -webdav" early_enter_chroot emerge -uNv $USEPKG dev-vcs/git
|
||||
USE="-curl -webdav" early_enter_chroot $EMERGE_CMD -uNv $USEPKG dev-vcs/git
|
||||
|
||||
# OpenSSL is a cros-workon package too, but the default http repo is now
|
||||
# unusable since we disabled building with curl above. Reject minilayouts.
|
||||
if [[ ! -d ${SRC_ROOT}/third_party/openssl ]]; then
|
||||
die "bootstrapping requires a full manifest checkout"
|
||||
fi
|
||||
early_enter_chroot $EMERGE_CMD -uNv $USEPKG --select $EMERGE_JOBS \
|
||||
dev-libs/openssl net-misc/curl
|
||||
|
||||
# (Re-)emerge the full version of git.
|
||||
info "Updating full version of git"
|
||||
early_enter_chroot $EMERGE_CMD -uNv $USEPKG dev-vcs/git
|
||||
fi
|
||||
|
||||
info "Updating host toolchain"
|
||||
early_enter_chroot emerge -uNv --quiet crossdev
|
||||
early_enter_chroot $EMERGE_CMD -uNv crossdev
|
||||
TOOLCHAIN_ARGS=( --deleteold )
|
||||
if [[ ${FLAGS_usepkg} -eq ${FLAGS_FALSE} ]]; then
|
||||
TOOLCHAIN_ARGS+=( --nousepkg )
|
||||
@ -452,12 +464,6 @@ info "Running emerge curl sudo ..."
|
||||
early_enter_chroot $EMERGE_CMD -uNv $USEPKG --select $EMERGE_JOBS \
|
||||
pbzip2 dev-libs/openssl net-misc/curl sudo
|
||||
|
||||
if [[ ${need_git_rebuild} -eq ${FLAGS_TRUE} ]]; then
|
||||
# (Re-)emerge the full version of git, without preventing curl.
|
||||
info "Updating full verison of git"
|
||||
early_enter_chroot emerge -uNv $USEPKG dev-vcs/git
|
||||
fi
|
||||
|
||||
if [ -n "${INITIALIZE_CHROOT}" ]; then
|
||||
# If we're creating a new chroot, we also want to set it to the latest
|
||||
# version.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user