build framework mmdebstrap - fix hashing of LEGACY_DEBOOTSTRAP

This commit is contained in:
tabris
2025-10-24 20:24:05 -04:00
committed by Igor
parent fef862f774
commit 77ee624aad
2 changed files with 3 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ function artifact_rootfs_config_dump() {
artifact_input_variables[LEGACY_DEBOOTSTRAP]="${LEGACY_DEBOOTSTRAP:-"no"}"
# Hash of the packages added/removed by extensions
declare pkgs_hash="undetermined"
pkgs_hash="$(echo "${REMOVE_PACKAGES[*]} ${EXTRA_PACKAGES_ROOTFS[*]} ${PACKAGE_LIST_BOARD_REMOVE} ${PACKAGE_LIST_FAMILY_REMOVE} ${LEGACY_DEBOOTSTRAP}" | sha256sum | cut -d' ' -f1)"
pkgs_hash="$(echo "${REMOVE_PACKAGES[*]} ${EXTRA_PACKAGES_ROOTFS[*]} ${PACKAGE_LIST_BOARD_REMOVE} ${PACKAGE_LIST_FAMILY_REMOVE}" | sha256sum | cut -d' ' -f1)"
artifact_input_variables[EXTRA_PKG_ADD_REMOVE_HASH]="${pkgs_hash}"
}

View File

@@ -28,7 +28,8 @@ function calculate_rootfs_cache_id() {
declare -a extension_hooks_to_hash=("custom_apt_repo")
declare -a extension_hooks_hashed=("$(dump_extension_method_sources_functions "${extension_hooks_to_hash[@]}")")
declare hash_hooks="undetermined"
hash_hooks="$(echo "${extension_hooks_hashed[@]}" | sha256sum | cut -d' ' -f1)"
declare legacy_debootstrap="${LEGACY_DEBOOTSTRAP:-"no"}"
hash_hooks="$(echo "${extension_hooks_hashed[@]}" LDB=${legacy_debootstrap,,} | sha256sum | cut -d' ' -f1)"
declare hash_hooks_short="${hash_hooks:0:${short_hash_size}}"
# AGGREGATED_ROOTFS_HASH is produced by aggregation.py