mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
update_chroot: fix clobbering of initial toolchain flags with --nousepkg
The current logic accidentally sets TOOLCHAIN_FLAGS when the --nousepkg flag is used rather than appending it leading to possible flag loss. While we're at it, use arrays. BUG=None TEST=`./setup_board --board=x32-generic --nousepkg` works now Change-Id: I33627ec088afb649b4fdde42b933a4af1521675b Reviewed-on: https://gerrit.chromium.org/gerrit/31150 Reviewed-by: Zdenek Behan <zbehan@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
df4a5b41ea
commit
5e2e27345f
@ -89,13 +89,13 @@ if [ "${FLAGS_skip_toolchain_update}" -eq "${FLAGS_FALSE}" ]; then
|
||||
# First update crossdev.
|
||||
sudo -E ${EMERGE_CMD} ${EMERGE_FLAGS} crossdev
|
||||
|
||||
TOOLCHAIN_FLAGS="--include-boards=${FLAGS_toolchain_boards}"
|
||||
TOOLCHAIN_FLAGS=( "--include-boards=${FLAGS_toolchain_boards}" )
|
||||
# This should really only be skipped while bootstrapping.
|
||||
if [ "${FLAGS_usepkg}" -eq "${FLAGS_FALSE}" ]; then
|
||||
TOOLCHAIN_FLAGS="--nousepkg"
|
||||
TOOLCHAIN_FLAGS+=( --nousepkg )
|
||||
fi
|
||||
# Expand the path before sudo, as root doesn't have the same path magic.
|
||||
sudo $(type -p cros_setup_toolchains) ${TOOLCHAIN_FLAGS}
|
||||
sudo $(type -p cros_setup_toolchains) "${TOOLCHAIN_FLAGS[@]}"
|
||||
fi
|
||||
|
||||
# Build cros_workon packages when they are changed.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user