Skip to content

Commit

Permalink
fix(ci): replace mirrorlist.centos with vault
Browse files Browse the repository at this point in the history
  • Loading branch information
fdintino committed Jul 1, 2024
1 parent 729c896 commit 425b875
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions wheelbuild/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,32 @@ if [[ "$MB_PYTHON_VERSION" == "2.7" ]]; then
fi
fi

for file in $(grep -l mirrorlist /etc/yum.repos.d/CentOS-*);do
if [[ "$file" == "/etc/yum.repos.d/CentOS-CR.repo" ]];then
echo "Enabling vault.centos.org in $file"
sed -i 's/baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file
else
echo "Disabling mirrorlist.centos.org in $file"
sed -i 's/mirrorlist\=/\#mirrorlist\=/g' $file
echo "Enabling vault.centos.org in $file"
sed -i 's/\#baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file
fi
done

for file in $(grep -l mirrorlist /etc/yum.repos.d/CentOS-SCLo*);do
echo "Disabling mirrorlist.centos.org in $file"
sed -i 's/mirrorlist\=/\#mirrorlist\=/g' $file
if [[ "$file" == "/etc/yum.repos.d/CentOS-SCLo-scl.repo" ]];then
echo "Enabling vault.centos.org in scl."
sed -i 's/\#\ baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file
elif [[ "$file" == "/etc/yum.repos.d/CentOS-SCLo-scl-rh.repo" ]];then
echo "Enabling vault.centos.org in scl-rh"
sed -i 's/\#baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file
else
echo "Not a SCL repo file"
fi
done

echo "::group::Install a virtualenv"
source multibuild/common_utils.sh
source multibuild/travis_steps.sh
Expand Down

0 comments on commit 425b875

Please sign in to comment.