diff --git a/iso/builder/build.sh b/iso/builder/build.sh index 7745176..c21987d 100755 --- a/iso/builder/build.sh +++ b/iso/builder/build.sh @@ -181,11 +181,11 @@ cp "${BUILDER_DIR}/genapkovl-bee.sh" "${HOME}/.mkimage/" # Export overlay dir so the profile script can find it regardless of SRCDIR. export BEE_OVERLAY_DIR="${OVERLAY_DIR}" -# Clean workdir selectively: remove everything except apks cache so packages aren't re-downloaded. -# mkimage stores each section in a hash-named subdir; apks_* dirs contain downloaded packages. +# Clean workdir: always nuke apks_* (stale packages from old mirror/version cause "unable to select" errors). +# Keep kernel_*, syslinux_*, grub_* — these are large but stable; they only change when KERNEL_PKG_VERSION changes. if [ -d /var/tmp/bee-iso-work ]; then find /var/tmp/bee-iso-work -maxdepth 1 -mindepth 1 \ - -not -name 'apks_*' -not -name 'kernel_*' \ + -not -name 'kernel_*' \ -not -name 'syslinux_*' -not -name 'grub_*' \ -exec rm -rf {} + 2>/dev/null || true fi