From 01268d9f5eddb895b4243f612052bb77c5f93cac Mon Sep 17 00:00:00 2001 From: Bruno Lopes Date: Tue, 24 Mar 2026 20:51:20 -0300 Subject: [PATCH] build/macos: Avoid unexpected ports upgrades We need to add this condition otherwise ports would be updated on gimp job causing disparity with deps job. --- build/macos/1_build-deps-macports.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/macos/1_build-deps-macports.sh b/build/macos/1_build-deps-macports.sh index 115cfe70df..f06193588b 100644 --- a/build/macos/1_build-deps-macports.sh +++ b/build/macos/1_build-deps-macports.sh @@ -43,7 +43,9 @@ if [ -f "$OPT_PREFIX/bin/port" ]; then elif echo "$CI_JOB_NAME" | grep -q 'deps'; then export first_cache=true fi - eval $( [ "$OPT_PREFIX" = /opt/local ] && echo sudo ) port sync -Nv + if echo "$CI_JOB_NAME" | grep -q 'deps' && { [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ] || [ "$first_cache" ] }; then + eval $( [ "$OPT_PREFIX" = /opt/local ] && echo sudo ) port sync -Nv + fi eval $( [ "$OPT_PREFIX" = /opt/local ] && echo sudo ) port install -N $(grep -v '^#' build/macos/all-deps-uni.txt | sed 's/|homebrew:[^ ]*//g' | tr -d '\' | xargs) if echo "$CI_JOB_NAME" | grep -q 'deps' && { [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ] || [ "$first_cache" ] }; then mkdir -p macports-cached-$(uname -m) && cp -fa $OPT_PREFIX/var/macports/* macports-cached-$(uname -m) || true