Simplify logic: fail if -r/R is passed with -x python3

This commit is contained in:
rallytime 2018-06-06 14:55:45 -04:00
parent e672bdc1b9
commit dfa4f46503
No known key found for this signature in database
GPG key ID: E8F1A4B90D0DEA19

View file

@ -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