Re: [PATCH v2] ci: fail the build if perforce, git-lfs, or JGit fail to install
- From
Harald Nordgren <haraldnordgren@gmail.com>
- Date
- Oct 26, 2026, 07:38 UTC
- Message-ID
- <CAHwyqnVVCp9ovsHDtc0pHYrFvpmdJq74gyx9yf3+ZWkL+d=CVA@mail.gmail.com>
- In-Reply-To
- <at79nEHLDrcoCgn_@pks.im>
Show 15 quoted lines
> > wget --quiet \
> > "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" &&
> > tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" \
> > -C "$CUSTOM_PATH" --strip-components=1 \
> > "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" &&
> > - rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" ||
> > - rm -f "$CUSTOM_PATH/git-lfs"
> > + rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" || {
> > + echo >&2 "error: could not install git-lfs"
> > + exit 1
> > + }
>
> This could all be a bit less convoluted if we had `set -e` in
> "ci/lib.sh". But that certainly is outside the scope of this patch
> series, so meanwhile this looks good to me.Yeah, `set -e` is a gem of a command. Would be good to do later!
Show 13 quoted lines
> > @@ -121,9 +133,16 @@ macos-*)
> >
> > mkdir -p "$CUSTOM_PATH"
> > wget -q "$P4WHENCE/bin.macosx12arm64/helix-core-server.tgz" &&
> > - tar -xf helix-core-server.tgz -C "$CUSTOM_PATH" p4 p4d &&
> > + tar -xf helix-core-server.tgz -C "$CUSTOM_PATH" p4 p4d || {
> > + echo >&2 "error: could not install perforce"
> > + exit 1
> > + }
> > sudo xattr -d com.apple.quarantine "$CUSTOM_PATH/p4" "$CUSTOM_PATH/p4d" 2>/dev/null || true
>
> This line is a bit curious, it makes me wonder whether we want to
> tighten it as well now. Any reason why we wouldn't?I asked Claud about it and it said this, does it make sense?
'wget/curl never set com.apple.quarantine in the first place (only Safari/Finder/AirDrop do, via the LaunchServices quarantine API), so xattr -d on these files always fails with "No such xattr." Tightening it to fatal would break every macOS build, every time.'
> > rm helix-core-server.tgz > > Nit: this is inconsistent with git-lfs, where we also have the call to > rm as part of the condition chain.
Good point!
Harald