From 817c9e38c38152ddbd87cf381c1502ba5b504aa7 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 10 Jul 2026 15:29:29 +0300 Subject: packages: fail fast on empty DTail version (review follow-up) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Makefile: new check-dtail-version target guards dtail-openbsd, dtail-freebsd, and the build-VM stamp recipe — a wrong DTAIL_SRC now aborts with a clear error before any VM start, /tmp cleanup, or remote work runs with an empty version in the file names (dtail-netbsd already had an equivalent inline guard) - Makefile: dtail-openbsd pre-cleans its stale staging tgz like the netbsd target, so a failed run can never silently upload an old package - pkg-dtail-openbsd.sh / pkg-dtail-freebsd.sh: reject a missing version argument like pkg-dtail-netbsd.sh (would otherwise build dtail-.tgz) Verified: make -n renders the guard first for both targets; make dtail-{openbsd,freebsd} DTAIL_SRC=/nonexistent fails fast with the version error before any rm/remote step. Guards only change failure paths — no package rebuild needed. Co-Authored-By: Claude Fable 5 --- packages/scripts/pkg-dtail-freebsd.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'packages/scripts/pkg-dtail-freebsd.sh') diff --git a/packages/scripts/pkg-dtail-freebsd.sh b/packages/scripts/pkg-dtail-freebsd.sh index 1d42aaf..b17c3b6 100644 --- a/packages/scripts/pkg-dtail-freebsd.sh +++ b/packages/scripts/pkg-dtail-freebsd.sh @@ -9,6 +9,10 @@ set -e VERSION="$1" +if [ -z "$VERSION" ]; then + echo "Error: version argument missing (would build dtail-.tgz)" >&2 + exit 1 +fi PV_DEST="$2" NAME="dtail" COMMENT="Distributed log tail and grep tool" -- cgit v1.2.3