From dfab067f894fc43ade4276459018ea7f36530898 Mon Sep 17 00:00:00 2001 From: Igor Velkov Date: Thu, 7 Mar 2024 23:32:05 +0200 Subject: [PATCH] Show correct reason about omit tmpfs usage if FORCE_USE_RAMDISK is set --- lib/functions/rootfs/trap-rootfs.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/functions/rootfs/trap-rootfs.sh b/lib/functions/rootfs/trap-rootfs.sh index 4966e7d02d..c00a9fe8f9 100644 --- a/lib/functions/rootfs/trap-rootfs.sh +++ b/lib/functions/rootfs/trap-rootfs.sh @@ -31,7 +31,10 @@ function prepare_rootfs_build_params_and_trap() { declare use_tmpfs=no # by default if [[ ${FORCE_USE_RAMDISK} == no ]]; then # do not use, even if it fits display_alert "Not using tmpfs for rootfs" "due to FORCE_USE_RAMDISK=no" "info" - elif [[ ${FORCE_USE_RAMDISK} == yes || ${available_physical_memory_mib} -gt ${tmpfs_estimated_size} ]]; then # use, either force or fits + elif [[ ${FORCE_USE_RAMDISK} == yes ]]; then # use, either force or fits + use_tmpfs=yes + display_alert "Using tmpfs for rootfs build" "FORCE_USE_RAMDISK forced to \"yes\"" "info" + elif [[ ${available_physical_memory_mib} -gt ${tmpfs_estimated_size} ]]; then use_tmpfs=yes display_alert "Using tmpfs for rootfs build" "RAM available: ${available_physical_memory_mib}MiB > ${tmpfs_estimated_size}MiB estimated" "info" else