This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/devlake.git
The following commit(s) were added to refs/heads/main by this push:
new c5de4091f fix(build): propagate errors out of the libgit2 cross-build
loop (#9165)
c5de4091f is described below
commit c5de4091fb28417c06dee994fd7d1f4513240d80
Author: Leif Roger Frøysaa <[email protected]>
AuthorDate: Thu Sep 24 15:33:44 2026 +0200
fix(build): propagate errors out of the libgit2 cross-build loop (#9165)
The aarch64/x86_64 cross-build for-loop had no 'set -e', so a cmake/make
failure for one arch was silently swallowed and the loop moved on to the
next, leaving that arch's libgit2 missing from /usr/local/deps while the
RUN step still exited 0.
Verified both aarch64 and x86_64 libgit2 still build successfully after
this change (native arm64 build of the 'builder' stage).
---
backend/Dockerfile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/backend/Dockerfile b/backend/Dockerfile
index d00239584..19ab59a2b 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -61,7 +61,10 @@ COPY --from=debian-arm64 /usr/lib/aarch64-linux-gnu
/rootfs-arm64/usr/lib/aarch6
COPY --from=debian-arm64 /lib/aarch64-linux-gnu
/rootfs-arm64/lib/aarch64-linux-gnu
-RUN for arch in aarch64 x86_64 ; do \
+# set -e: otherwise a build failure for one arch is silently skipped and the
+# other arch's libgit2 is never installed under /usr/local/deps.
+RUN set -e; \
+ for arch in aarch64 x86_64 ; do \
mkdir -p /tmp/build/${arch} && cd /tmp/build/${arch} && \
wget
https://github.com/libgit2/libgit2/archive/refs/tags/v1.5.0.tar.gz -O - | tar
-xz && \
cd libgit2-1.5.0 && \