From dfa4f4650346c2cf95598700cd2985c0ab67264c Mon Sep 17 00:00:00 2001 From: rallytime Date: Wed, 6 Jun 2018 14:55:45 -0400 Subject: [PATCH] Simplify logic: fail if -r/R is passed with -x python3 --- bootstrap-salt.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index fa96eb8..51070fd 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3632,13 +3632,14 @@ install_centos_stable_deps() { yum -y update || return 1 fi - if [ "$_DISABLE_REPOS" -eq "$BS_FALSE" ] || ( [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ] ); then - - if [ "$_DISABLE_REPOS" -eq "$BS_TRUE" ]; then - echowarn "Detected -r or -R option while installing Salt packages for Python 3." - echowarn "Python 3 packages for Salt require the EPEL repository to be installed." - fi + if [ "$_DISABLE_REPOS" -eq "$BS_TRUE" ] && [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + echoerror "Detected -r or -R option while installing Salt packages for Python 3." + echoerror "Python 3 packages for Salt require the EPEL repository to be installed." + echoerror "The -r and -R options are incompatible with -x and Python 3 bootstrap installs." + return 1 + fi + if [ "$_DISABLE_REPOS" -eq "$BS_FALSE" ]; then __install_epel_repository || return 1 __install_saltstack_rhel_repository || return 1 fi