Drop all references to a toolchain-specific binpkg host

This evidently hasn't been used in a very long time, if ever, and it's
just adding confusion.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This commit is contained in:
James Le Cuirot 2025-04-16 12:11:57 +01:00
parent 8fae246f25
commit 50d7dd1a84
No known key found for this signature in database
GPG Key ID: 1226415D00DD3137
4 changed files with 5 additions and 34 deletions

View File

@ -38,8 +38,7 @@ CHOST=$(get_board_chost $BOARD)
DISTDIR="/var/lib/portage/distfiles"
PKGDIR="/var/lib/portage/pkgs"
PORT_LOGDIR="/var/log/portage"
PORTAGE_BINHOST="$(get_binhost_url "${binhost}" "${update_group}" 'pkgs')
$(get_binhost_url "${binhost}" "${update_group}" 'toolchain')"
PORTAGE_BINHOST="$(get_binhost_url "${binhost}" "${update_group}" 'pkgs')"
EOF
sudo_clobber "${root_fs_dir}/etc/portage/repos.conf/portage-stable.conf" <<EOF

View File

@ -130,37 +130,24 @@ get_board_profile() {
done
}
# Usage: get_board_binhost [-t] board [version...]
# -t: toolchain only, full rebuilds re-using toolchain pkgs
# Usage: get_board_binhost board [version...]
# If no versions are specified the current and SDK versions are used.
get_board_binhost() {
local toolchain_only=0 board ver
if [[ "$1" == "-t" ]]; then
toolchain_only=1
shift
fi
local board ver
board="$1"
shift
local pkgs_include_toolchain=0
if [[ $# -eq 0 ]]; then
if [[ "${FLATCAR_BUILD_ID}" =~ ^nightly-.*$ ]] ; then
# containerised nightly build; this uses [VERSION]-[BUILD_ID] for binpkg url
# and toolchain packages are at the same location as OS image ones
set -- "${FLATCAR_VERSION_ID}+${FLATCAR_BUILD_ID}"
pkgs_include_toolchain=1
else
set -- "${FLATCAR_VERSION_ID}"
fi
fi
for ver in "$@"; do
if [[ $toolchain_only -eq 0 ]]; then
echo "${FLATCAR_DEV_BUILDS}/boards/${board}/${ver}/pkgs/"
fi
if [[ $pkgs_include_toolchain -eq 0 ]]; then
echo "${FLATCAR_DEV_BUILDS}/boards/${board}/${ver}/toolchain/"
fi
echo "${FLATCAR_DEV_BUILDS}/boards/${board}/${ver}/pkgs/"
done
}
@ -196,13 +183,9 @@ get_sdk_binhost() {
FLATCAR_DEV_BUILDS_SDK="${FLATCAR_DEV_BUILDS_SDK-${SETTING_BINPKG_SERVER_PROD}/sdk}"
fi
for ver in "$@"; do
# Usually only crossdev needs to be fetched from /toolchain/ in the setup_board step.
# The entry for /pkgs/ is there if something needs to be reinstalled in the SDK
# but normally it is not needed because everything is already part of the tarball.
# To install the crossdev Rust package, /toolchain-arm64/ is derived from /toolchain/
# when necessary in install_cross_toolchain().
if curl -Ifs -o /dev/null "${FLATCAR_DEV_BUILDS_SDK}/${arch}/${ver}/pkgs/"; then
echo "${FLATCAR_DEV_BUILDS_SDK}/${arch}/${ver}/toolchain/"
echo "${FLATCAR_DEV_BUILDS_SDK}/${arch}/${ver}/pkgs/"
fi
done

View File

@ -24,8 +24,6 @@ DEFINE_boolean getbinpkg "${FLAGS_TRUE}" \
"Download binary packages from remote repository."
DEFINE_string getbinpkgver "" \
"Use binary packages from a specific version."
DEFINE_boolean toolchainpkgonly "${FLAGS_FALSE}" \
"Use binary packages only for the board toolchain."
DEFINE_boolean workon "${FLAGS_TRUE}" \
"Automatically rebuild updated flatcar-workon packages."
DEFINE_boolean fetchonly "${FLAGS_FALSE}" \
@ -100,11 +98,6 @@ if [ "${FLAGS_usepkg}" -eq "${FLAGS_TRUE}" ]; then
else
UPDATE_ARGS+=( --nogetbinpkg )
fi
if [[ "${FLAGS_toolchainpkgonly}" -eq "${FLAGS_TRUE}" ]]; then
UPDATE_ARGS+=( --toolchainpkgonly )
else
UPDATE_ARGS+=( --notoolchainpkgonly )
fi
if [[ -n "${FLAGS_getbinpkgver}" ]]; then
UPDATE_ARGS+=( --getbinpkgver="${FLAGS_getbinpkgver}" )
fi

View File

@ -31,8 +31,6 @@ DEFINE_string pkgdir "" \
"Use binary packages from a custom directory instead of /build/[ARCH]/var/lib/portage/pkgs/."
DEFINE_string binhost "" \
"Use binary packages from a specific location instead of $FLATCAR_DEV_BUILDS/... "
DEFINE_boolean toolchainpkgonly "${FLAGS_FALSE}" \
"Use binary packages only for the board toolchain."
DEFINE_boolean skip_toolchain_update "${FLAGS_FALSE}" \
"Don't update toolchain automatically."
DEFINE_boolean skip_chroot_upgrade "${FLAGS_FALSE}" \
@ -136,13 +134,11 @@ EOF
}
generate_binhost_list() {
local t
[[ "${FLAGS_toolchainpkgonly}" -eq "${FLAGS_TRUE}" ]] && t="-t"
FLAGS_getbinpkgver="${FLAGS_getbinpkgver/current/${FLATCAR_VERSION_ID}}"
FLAGS_getbinpkgver="${FLAGS_getbinpkgver/latest/${FLATCAR_VERSION_ID}}"
FLAGS_getbinpkgver="${FLAGS_getbinpkgver/sdk/${FLATCAR_SDK_VERSION}}"
get_board_binhost $t "${BOARD}" ${FLAGS_getbinpkgver}
get_board_binhost "${BOARD}" ${FLAGS_getbinpkgver}
}
# Parse command line flags