From 75c33e073e49231e8a3595a0ccc2f069762c6d64 Mon Sep 17 00:00:00 2001 From: Mikhail Chusavitin Date: Mon, 4 May 2026 09:52:31 +0300 Subject: [PATCH] Fix split_live_squashfs_layers crash under POSIX sh (dash) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit trap RETURN is a bash extension not supported by /bin/sh on Debian. With set -e active the unsupported trap call exited the build immediately after lb build, before bootloader sync and ISO copy steps ran. Remove both trap RETURN lines — explicit rm -rf at the end of the function is sufficient for cleanup on the happy path. Co-Authored-By: Claude Sonnet 4.6 --- iso/builder/build.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/iso/builder/build.sh b/iso/builder/build.sh index f6b389f..6bb2a1a 100755 --- a/iso/builder/build.sh +++ b/iso/builder/build.sh @@ -986,7 +986,6 @@ split_live_squashfs_layers() { tmp_root="$(mktemp -d)" tmp_usr="$(mktemp -d)" tmp_fw="$(mktemp -d)" - trap 'rm -rf "$tmp_root" "$tmp_usr" "$tmp_fw"' RETURN echo "=== splitting live squashfs into smaller layers ===" unsquashfs -d "$tmp_root/root" "$base_sq" >/dev/null @@ -1013,7 +1012,6 @@ split_live_squashfs_layers() { echo "=== live squashfs layers ===" find "$live_dir" -maxdepth 1 -type f -name '*.squashfs' -exec du -sh {} \; | sort rm -rf "$tmp_root" "$tmp_usr" "$tmp_fw" - trap - RETURN } recover_iso_memtest() {