Fix split_live_squashfs_layers crash under POSIX sh (dash)
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 <noreply@anthropic.com>
This commit is contained in:
@@ -986,7 +986,6 @@ split_live_squashfs_layers() {
|
|||||||
tmp_root="$(mktemp -d)"
|
tmp_root="$(mktemp -d)"
|
||||||
tmp_usr="$(mktemp -d)"
|
tmp_usr="$(mktemp -d)"
|
||||||
tmp_fw="$(mktemp -d)"
|
tmp_fw="$(mktemp -d)"
|
||||||
trap 'rm -rf "$tmp_root" "$tmp_usr" "$tmp_fw"' RETURN
|
|
||||||
|
|
||||||
echo "=== splitting live squashfs into smaller layers ==="
|
echo "=== splitting live squashfs into smaller layers ==="
|
||||||
unsquashfs -d "$tmp_root/root" "$base_sq" >/dev/null
|
unsquashfs -d "$tmp_root/root" "$base_sq" >/dev/null
|
||||||
@@ -1013,7 +1012,6 @@ split_live_squashfs_layers() {
|
|||||||
echo "=== live squashfs layers ==="
|
echo "=== live squashfs layers ==="
|
||||||
find "$live_dir" -maxdepth 1 -type f -name '*.squashfs' -exec du -sh {} \; | sort
|
find "$live_dir" -maxdepth 1 -type f -name '*.squashfs' -exec du -sh {} \; | sort
|
||||||
rm -rf "$tmp_root" "$tmp_usr" "$tmp_fw"
|
rm -rf "$tmp_root" "$tmp_usr" "$tmp_fw"
|
||||||
trap - RETURN
|
|
||||||
}
|
}
|
||||||
|
|
||||||
recover_iso_memtest() {
|
recover_iso_memtest() {
|
||||||
|
|||||||
Reference in New Issue
Block a user