From 8976e020e9894ec970809c20d94c5fa15a3fe687 Mon Sep 17 00:00:00 2001 From: DanS Date: Tue, 21 Jul 2026 16:04:08 -0500 Subject: [PATCH] packaging: don't fail the .deb build when optional lintian is absent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build-debian-package.sh warns at startup that lintian is optional, but then called `lintian -i ...` unconditionally at the end. Under `set -e` that aborted with exit 127 on hosts without lintian — after the .deb had already been built. Guard the call with `command -v lintian` so the build exits 0. Co-Authored-By: Claude Opus 4.8 (1M context) --- util/build-debian-package.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/util/build-debian-package.sh b/util/build-debian-package.sh index 9505b7ec0..5b48a1938 100755 --- a/util/build-debian-package.sh +++ b/util/build-debian-package.sh @@ -115,6 +115,11 @@ dpkg-gencontrol -P$BUILD_DIR -v$DEBVERSION fakeroot dpkg-deb --build $BUILD_DIR cp $BUILD_PATH/$PACKAGE_NAME-$PACKAGE_VERSION-$ARCH.deb $SRC_PATH shasum -a 256 $SRC_PATH/$PACKAGE_NAME-$PACKAGE_VERSION-$ARCH.deb -# Analyze with Lintian, reporting bugs and policy violations -lintian -i $SRC_PATH/$PACKAGE_NAME-$PACKAGE_VERSION-$ARCH.deb +# Analyze with Lintian, reporting bugs and policy violations (optional tool). +# Guarded so the build does not fail under `set -e` when lintian is not installed. +if command -v lintian >/dev/null 2>&1; then + lintian -i $SRC_PATH/$PACKAGE_NAME-$PACKAGE_VERSION-$ARCH.deb +else + echo "lintian not installed; skipping package analysis. The .deb was built successfully." +fi exit 0