From 4779cc92ff1b739f0f00c96583834e42f7ef88cf Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Wed, 21 Dec 2022 09:47:22 -0800 Subject: [PATCH] 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. --- bootstrap-salt.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 21f847b..6ba1da8 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -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