Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion lib/functions/artifacts/artifact-armbian-bsp-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function artifact_armbian-bsp-cli_config_dump() {
function artifact_armbian-bsp-cli_prepare_version() {
: "${BRANCH:?BRANCH is not set}"
: "${BOARD:?BOARD is not set}"
: "${LINUXFAMILY:?LINUXFAMILY is not set}" # empty would make the packages/bsp hash below cover the whole tree

artifact_version="undetermined" # outer scope
artifact_version_reason="undetermined" # outer scope
Expand Down Expand Up @@ -73,12 +74,22 @@ function artifact_armbian-bsp-cli_prepare_version() {
declare var_config_hash_short="${vars_config_hash:0:${short_hash_size}}"

declare -a dirs_to_hash=(
"${SRC}/packages/bsp/common" # common stuff
"${SRC}/packages/bsp/common" # common stuff
"${SRC}/packages/bsp/${LINUXFAMILY}" # family files, installed by post_family_tweaks_bsp hooks
"${SRC}/packages/bsp/${BOARD}" # board files, ditto
"${SRC}/config/optional/_any_board/_packages/bsp-cli"
"${SRC}/config/optional/architectures/${ARCH}/_packages/bsp-cli"
"${SRC}/config/optional/families/${LINUXFAMILY}/_packages/bsp-cli"
"${SRC}/config/optional/boards/${BOARD}/_packages/bsp-cli"
)

# The hooks are hashed above, but only as source text: an `install ${SRC}/packages/bsp/foo/bar`
# line reads the same whether bar changed or not. Directories no entry above reaches - shared
# ones like packages/bsp/aic8800 - are thus invisible to the version, and the deb comes back
# from cache with the old file in it. List them here, absolute, from the family config or an
# extension's extension_prepare_config.
dirs_to_hash+=("${BSP_CLI_EXTRA_HASH_DIRS[@]+"${BSP_CLI_EXTRA_HASH_DIRS[@]}"}")

declare hash_files="undetermined"
calculate_hash_for_all_files_in_dirs "${dirs_to_hash[@]}"
packages_config_hash="${hash_files}"
Expand Down