Merge pull request #2080 from flatcar/krnowak/flatcar-workon-fixes

Fixes for flatcar-workon
This commit is contained in:
Krzesimir Nowak 2024-07-02 12:52:35 +02:00 committed by GitHub
commit ec42290d3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View File

@ -6,6 +6,8 @@
DEFINE_string board "${DEFAULT_BOARD}" \
"The board to set package keywords for."
DEFINE_boolean host "${FLAGS_FALSE}" \
"Uses the host instead of board"
FLAGS_HELP="usage: $0 <command> [flags] <atom>
commands:
@ -17,6 +19,13 @@ eval set -- "${FLAGS_ARGV}"
set -euo pipefail
# If both board and host are specified, just use host, because board
# does not have to be specified and may come from default, in which
# case there's no way to override.
if [[ -n ${FLAGS_board} && ${FLAGS_host} = "${FLAGS_TRUE}" ]]; then
unset FLAGS_board # kill board
fi
# /etc/portage under either / or /build/<board>.
ETC_PORTAGE=${FLAGS_board+/build/${FLAGS_board}}/etc/portage

View File

@ -235,7 +235,7 @@ fi
# Build flatcar_workon packages when they are changed.
WORKON_PKGS=()
if [[ ${FLAGS_workon} -eq "${FLAGS_TRUE}" ]]; then
mapfile -t WORKON_PKGS < <("${SRC_ROOT}"/scripts/flatcar_workon list)
mapfile -t WORKON_PKGS < <("${SRC_ROOT}"/scripts/flatcar_workon --host list)
fi
if [[ ${#WORKON_PKGS[@]} -gt 0 ]]; then