diff --git a/update_chroot b/update_chroot index 1f347abc00..4f5fc84985 100755 --- a/update_chroot +++ b/update_chroot @@ -46,6 +46,17 @@ switch_to_strict_mode . ${SCRIPTS_DIR}/sdk_lib/make_conf_util.sh +# Create /etc/make.conf.host_setup. The file content is regenerated +# from scratch every update. There are various reasons to do this: +# + It's cheap, so this is an easy way to guarantee correct content +# after an upgrade. +# + Inside make_chroot.sh, we use a temporary version of the file +# which must be updated before the script completes; that final +# update happens here. +# + If the repositories change to add or remove the private +# overlay, the file may need to be regenerated. +create_host_setup + # Run version hooks as pre-update if [[ -f /etc/lsb-release ]]; then OLDVER=$(grep "^COREOS_RELEASE_VERSION=" /etc/lsb-release | cut -d = -f 2-) @@ -53,6 +64,10 @@ else OLDVER="0.0.0" fi +info "Updating chroot:" +info " chroot version: $OLDVER" +info " CoreOS version: $COREOS_VERSION_STRING" + # Updates should be of the form 1.2.3_desc.sh for update_script in ${SCRIPTS_DIR}/sdk_lib/updates/*.sh; do update_name="${update_script##*/}" @@ -71,19 +86,6 @@ done --root / --production_track sdk \ --board "$(portageq envvar ARCH)-host" -# Create /etc/make.conf.host_setup. The file content is regenerated -# from scratch every update. There are various reasons to do this: -# + It's cheap, so this is an easy way to guarantee correct content -# after an upgrade. -# + Inside make_chroot.sh, we use a temporary version of the file -# which must be updated before the script completes; that final -# update happens here. -# + If the repositories change to add or remove the private -# overlay, the file may need to be regenerated. -create_host_setup - -info "Updating chroot" - EMERGE_FLAGS="-uNv --with-bdeps=y --select" if [ "${FLAGS_usepkg}" -eq "${FLAGS_TRUE}" ]; then EMERGE_FLAGS="${EMERGE_FLAGS} --usepkg"