From a6b3ff9bab405f9d45c35d9a632a0a1ce5276a83 Mon Sep 17 00:00:00 2001 From: Christos Longros <98426896+chrislongros@users.noreply.github.com> Date: Wed, 15 Apr 2026 23:50:20 +0200 Subject: [PATCH] deb.am: propagate build errors in native-deb targets Replace semicolons with && so build failures are not masked by the subsequent lockfile cleanup. Use trap to ensure the lockfile is removed on both success and failure. Reviewed-by: Brian Behlendorf Signed-off-by: Christos Longros Closes #18206 Closes #18424 --- config/deb.am | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/config/deb.am b/config/deb.am index ebadc85c2..1732ab22e 100644 --- a/config/deb.am +++ b/config/deb.am @@ -94,17 +94,17 @@ debian: cp -r contrib/debian debian; chmod +x debian/rules; native-deb-utils: native-deb-local debian - while [ -f debian/deb-build.lock ]; do sleep 1; done; \ - echo "native-deb-utils" > debian/deb-build.lock; \ - cp contrib/debian/control debian/control; \ - $(DPKGBUILD) -b -rfakeroot -us -uc; \ - $(RM) -f debian/deb-build.lock + while [ -f debian/deb-build.lock ]; do sleep 1; done && \ + echo "native-deb-utils" > debian/deb-build.lock && \ + trap '$(RM) -f debian/deb-build.lock' EXIT && \ + cp contrib/debian/control debian/control && \ + $(DPKGBUILD) -b -rfakeroot -us -uc native-deb-kmod: native-deb-local debian - while [ -f debian/deb-build.lock ]; do sleep 1; done; \ - echo "native-deb-kmod" > debian/deb-build.lock; \ - sh scripts/make_gitrev.sh; \ - fakeroot debian/rules override_dh_binary-modules; \ - $(RM) -f debian/deb-build.lock + while [ -f debian/deb-build.lock ]; do sleep 1; done && \ + echo "native-deb-kmod" > debian/deb-build.lock && \ + trap '$(RM) -f debian/deb-build.lock' EXIT && \ + sh scripts/make_gitrev.sh && \ + fakeroot debian/rules override_dh_binary-modules native-deb: native-deb-utils native-deb-kmod