From d414838b7cff13731ef4c406f695a08faf04c9e8 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 1 Oct 2026 11:26:11 -0400 Subject: [PATCH] ci: disable git auto-maintenance in staged build scripts git's background auto-maintenance can hold, and then delete, a maintenance.lock in a cached source clone while rattler-build copies it, failing the build with "FileSystem error: ... .git/objects/maintenance.lock does not exist". testpr.yml already disables it; do the same in .scripts/build_unix.sh and .scripts/build_win.bat. Co-Authored-By: Claude Opus 5.5 --- .scripts/build_unix.sh | 5 +++++ .scripts/build_win.bat | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/.scripts/build_unix.sh b/.scripts/build_unix.sh index 07986ad5f..032b95d1c 100755 --- a/.scripts/build_unix.sh +++ b/.scripts/build_unix.sh @@ -18,6 +18,11 @@ export PYTHONUNBUFFERED=1 export FEEDSTOCK_ROOT=`pwd` export "CONDA_BLD_PATH=$HOME/conda-bld/" +# git's background auto-maintenance can hold (and then delete) a lock file in a +# cached source clone while rattler-build copies it, failing the build with +# "FileSystem error: ... .git/objects/maintenance.lock does not exist". +git config --global maintenance.auto false + if [[ "$target" == *"osx"* ]]; then echo "osx" export PATH=$(echo $PATH | tr ":" "\n" | grep -v 'homebrew' | xargs | tr ' ' ':') diff --git a/.scripts/build_win.bat b/.scripts/build_win.bat index 512491e02..5ce9808cc 100644 --- a/.scripts/build_win.bat +++ b/.scripts/build_win.bat @@ -10,6 +10,10 @@ set "FEEDSTOCK_ROOT=%cd%" mkdir %CONDA_BLD_PATH% +:: git's background auto-maintenance can hold (and then delete) a lock file in a +:: cached source clone while rattler-build copies it, failing the build. +git config --global maintenance.auto false + :: Enable long path names on Windows reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f