Skip to content

Commit

Permalink
board/common: fix rauc compatible regression
Browse files Browse the repository at this point in the history
The new variable INFIX_COMPATIBLE, used for the RAUC compatible string,
is not properly evaluated on defconfigs where it is composed of another
variable, e.g.

    INFIX_COMPATIBLE="${INFIX_IMAGE_ID}"

Unfortunately, this is the default value for INFIX_COMPATIBLE, and so it
breaks all tier one defconfigs on the mainline branch since a1771ff.

Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Oct 28, 2024
1 parent 55a20bb commit dbf0fd2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions board/common/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,22 @@ die()
# DISK_IMAGE_SIZE="512"
# etc.
#
# Nested variables, like INFIX_COMPATIBLE="${INFIX_IMAGE_ID}"
# are handled by sourcing the file in a subshell.
#
# shellcheck disable=SC1090
load_cfg()
{
tmp=$(mktemp -p /tmp)
(
. "$BR2_CONFIG" 2>/dev/null

grep -E "${1}.*=" "$BR2_CONFIG" >"$tmp"
. "$tmp"
# Set *all* matching variables
set | grep -E "^${1}[^=]*=" | while IFS= read -r line; do
echo "$line"
done
) > "$tmp"

. "$tmp"
rm "$tmp"
}

0 comments on commit dbf0fd2

Please sign in to comment.