when installing git_deps, fall back to onedir_deps if stable_deps fails. will happens if installing on a Red Hat based host, eg. CentOS Stream 9, Alma Linux 9, etc, as the classic package repos do not exist there.

This commit is contained in:
Gareth J. Greenaway 2022-12-21 09:47:22 -08:00
parent 7e53753536
commit 4779cc92ff
No known key found for this signature in database
GPG key ID: 10B62F8A7CAD7A41

View file

@ -4617,7 +4617,12 @@ install_centos_stable_post() {
}
install_centos_git_deps() {
install_centos_stable_deps || return 1
# First try stable deps then fall back to onedir deps if that one fails
# if we're installing on a Red Hat based host that doesn't have the classic
# package repos available.
install_centos_stable_deps || \
install_centos_onedir_deps || \
return 1
if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then
__yum_install_noinput ca-certificates || return 1