fix: complete the deploy-tool dependency gate (end the whack-a-mole)
deploy-disk.sh had its own hardcoded tool check that was out of sync with check-host-deps.sh, so builds got past the host gate and then failed at deploy time with "missing host tool mkfs.btrfs" (btrfs-progs was never in check-host-deps.sh). - check-host-deps.sh: add mkfs.btrfs/btrfs (btrfs-progs) plus curl/git so `make deps` / check-host-deps --install covers the entire build + deploy path in one go. - deploy-disk.sh: pre-flight now checks the full tool set (sgdisk, partprobe, mkfs.btrfs, btrfs, rsync, wipefs, truncate, + mkfs.vfat for efi) and reports ALL missing tools at once with the exact apt install command, instead of dying on the first one. - build-live.sh: the live image explicitly installs gdisk, parted, dosfstools, btrfs-progs, rsync so the graphical installer always has the deploy tooling regardless of edition.
This commit is contained in:
@@ -42,10 +42,26 @@ validate_edition "$EDITION"
|
||||
[[ -d "$ROOTFS" ]] || die "rootfs '$ROOTFS' does not exist (build it first: make rootfs-$EDITION)"
|
||||
[[ -e "$DEV" ]] || die "device '$DEV' does not exist"
|
||||
|
||||
for tool in sgdisk mkfs.btrfs rsync; do
|
||||
command -v "$tool" >/dev/null || die "missing host tool '$tool' (run: scripts/check-host-deps.sh --install)"
|
||||
# ── deploy tool pre-flight ─────────────────────────────────────────────────
|
||||
# Report EVERY missing tool at once (no one-at-a-time whack-a-mole), with the
|
||||
# exact install command. Runs on the build host for image/install builds and
|
||||
# inside the live image for the graphical installer.
|
||||
declare -A TOOL_PKG=(
|
||||
[sgdisk]=gdisk [partprobe]=parted
|
||||
[mkfs.btrfs]=btrfs-progs [btrfs]=btrfs-progs
|
||||
[rsync]=rsync [wipefs]=util-linux [truncate]=coreutils
|
||||
[mkfs.vfat]=dosfstools
|
||||
)
|
||||
MISSING_TOOLS=()
|
||||
for tool in sgdisk partprobe mkfs.btrfs btrfs rsync wipefs truncate mkfs.vfat; do
|
||||
[[ "$tool" == "mkfs.vfat" && "$BOOT" != "efi" ]] && continue
|
||||
command -v "$tool" >/dev/null 2>&1 || MISSING_TOOLS+=("$tool")
|
||||
done
|
||||
[[ "$BOOT" == "efi" ]] && { command -v mkfs.vfat >/dev/null || die "missing 'mkfs.vfat' (package: dosfstools)"; }
|
||||
if [[ ${#MISSING_TOOLS[@]} -gt 0 ]]; then
|
||||
pkgs=""
|
||||
for t in "${MISSING_TOOLS[@]}"; do pkgs+=" ${TOOL_PKG[$t]}"; done
|
||||
die "missing deploy tools: ${MISSING_TOOLS[*]} — install: apt-get install -y${pkgs} (or: scripts/check-host-deps.sh --install)"
|
||||
fi
|
||||
|
||||
# device + partition naming: /dev/sda → /dev/sda1, /dev/nvme0n1 → /dev/nvme0n1p1, /dev/loop0 → /dev/loop0p1
|
||||
part_of() {
|
||||
|
||||
Reference in New Issue
Block a user