fix: incremental rootfs builds so stale archives are never deployed
The deploy failed with "grub-install: command not found" in the chroot — the installed rootfs archive was built BEFORE the BOOT/grub injection, so it had no bootloader at all. build-iso.sh / build-image.sh only rebuilt the rootfs when the archive was missing, never when sources changed, so development fixes were silently absent from deployed images. - build-rootfs.sh: incremental staleness check — skips a rebuild only when no input (scripts/, btrfs/, overlays/, editions/<e>/, versions.mk, toolchain debs) is newer than the artifact; FORCE=1 rebuilds anyway. - build-iso.sh / build-image.sh: always delegate freshness to build-rootfs.sh instead of gating on file existence. - deploy-disk.sh: defensive check that grub-install exists in the deployed rootfs, with a clear "stale archive — rebuild" message instead of a bare "command not found". - docs/building.md: incremental-build note (FORCE=1 / make clean).
This commit is contained in:
@@ -49,11 +49,8 @@ ARTIFACT="$ARTIFACT_DIR/arcline-$EDITION-$VERSION-$ARCH.$EXT"
|
||||
mkdir -p "$IMAGE_DIR/$EDITION" "$ARTIFACT_DIR"
|
||||
rm -f "$RAW" "$ARTIFACT" "$ARTIFACT.sha256"
|
||||
|
||||
# ── 1. rootfs ───────────────────────────────────────────────────────────────
|
||||
if [[ ! -d "$ROOTFS" ]]; then
|
||||
log "rootfs missing — building it first"
|
||||
"$ROOT/scripts/build-rootfs.sh" "$EDITION"
|
||||
fi
|
||||
# ── 1. rootfs (incremental: build-rootfs skips when inputs are unchanged) ─
|
||||
"$ROOT/scripts/build-rootfs.sh" "$EDITION"
|
||||
|
||||
# ── 2. sparse raw file + loop device ────────────────────────────────────────
|
||||
log "creating ${SIZE} sparse image (edition $EDITION, $BOOT boot)"
|
||||
|
||||
Reference in New Issue
Block a user