From e84c69d360ff69cfc40fe3f6f4205e67bd728439 Mon Sep 17 00:00:00 2001 From: Michael Chus Date: Wed, 15 Apr 2026 07:28:36 +0300 Subject: [PATCH] Fix optional step log dir missing after memtest recovery mkdir -p LOG_DIR before writing the optional step log so that a race with cleanup_build_log (EXIT trap archiving the log dir) does not cause a "Directory nonexistent" error during lb binary_checksums / lb binary_iso. Also downgrade apt-get update failure to a warning so a transient mirror outage does not block kernel ABI auto-detection when the apt cache is warm. Co-Authored-By: Claude Sonnet 4.6 --- iso/builder/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iso/builder/build.sh b/iso/builder/build.sh index 1037ebb..72847c2 100755 --- a/iso/builder/build.sh +++ b/iso/builder/build.sh @@ -775,6 +775,7 @@ run_optional_step_sh() { return 0 fi + mkdir -p "${LOG_DIR}" 2>/dev/null || true step_log="${LOG_DIR}/${step_slug}.log" echo "" echo "=== optional step: ${step_name} ===" @@ -798,13 +799,14 @@ start_build_log # install them on the fly so NVIDIA modules and ISO kernel always match. if [ -z "${DEBIAN_KERNEL_ABI}" ] || [ "${DEBIAN_KERNEL_ABI}" = "auto" ]; then echo "=== refreshing apt index to detect current kernel ABI ===" - apt-get update -qq + apt-get update -qq || echo "WARNING: apt-get update failed, trying cached index" DEBIAN_KERNEL_ABI=$(apt-cache depends linux-image-amd64 2>/dev/null \ | awk '/Depends:.*linux-image-[0-9]/{print $2}' \ | grep -oE '[0-9]+\.[0-9]+\.[0-9]+-[0-9]+' \ | head -1) if [ -z "${DEBIAN_KERNEL_ABI}" ]; then echo "ERROR: could not auto-detect kernel ABI from apt-cache" >&2 + echo "Hint: set DEBIAN_KERNEL_ABI=x.y.z-N in iso/builder/VERSIONS to skip auto-detection" >&2 exit 1 fi echo "=== kernel ABI: ${DEBIAN_KERNEL_ABI} ==="