Remove daily install option on Ubuntu system.

Reference:

* https://github.com/saltstack/salt-bootstrap/issues/1245
* https://github.com/saltstack/salt-pack/issues/562
This commit is contained in:
Ky-Anh Huynh 2018-06-22 10:19:41 +07:00
parent 04f32250b4
commit 375b74a1ba
No known key found for this signature in database
GPG key ID: B47786AF503CDEA5
2 changed files with 3 additions and 70 deletions

View file

@ -289,7 +289,6 @@ __usage() {
for packages available at repo.saltstack.com for packages available at repo.saltstack.com
- stable [version] Install a specific version. Only supported for - stable [version] Install a specific version. Only supported for
packages available at repo.saltstack.com packages available at repo.saltstack.com
- daily Ubuntu specific: configure SaltStack Daily PPA
- testing RHEL-family specific: configure EPEL testing repo - testing RHEL-family specific: configure EPEL testing repo
- git Install from the head of the develop branch - git Install from the head of the develop branch
- git [ref] Install from any git ref (such as a branch, tag, or - git [ref] Install from any git ref (such as a branch, tag, or
@ -300,7 +299,6 @@ __usage() {
- ${__ScriptName} stable - ${__ScriptName} stable
- ${__ScriptName} stable 2017.7 - ${__ScriptName} stable 2017.7
- ${__ScriptName} stable 2017.7.2 - ${__ScriptName} stable 2017.7.2
- ${__ScriptName} daily
- ${__ScriptName} testing - ${__ScriptName} testing
- ${__ScriptName} git - ${__ScriptName} git
- ${__ScriptName} git 2017.7 - ${__ScriptName} git 2017.7
@ -567,7 +565,7 @@ if [ "$#" -gt 0 ];then
fi fi
# Check installation type # Check installation type
if [ "$(echo "$ITYPE" | grep -E '(stable|testing|daily|git)')" = "" ]; then if [ "$(echo "$ITYPE" | grep -E '(stable|testing|git)')" = "" ]; then
echoerror "Installation type \"$ITYPE\" is not known..." echoerror "Installation type \"$ITYPE\" is not known..."
exit 1 exit 1
fi fi
@ -584,10 +582,6 @@ if [ "$ITYPE" = "git" ]; then
# Disable shell warning about unbound variable during git install # Disable shell warning about unbound variable during git install
STABLE_REV="latest" STABLE_REV="latest"
elif [ "$ITYPE" = "daily" ]; then
# Disable shell error about unbound variable during daily install
STABLE_REV="latest"
# If doing stable install, check if version specified # If doing stable install, check if version specified
elif [ "$ITYPE" = "stable" ]; then elif [ "$ITYPE" = "stable" ]; then
if [ "$#" -eq 0 ];then if [ "$#" -eq 0 ];then
@ -980,7 +974,7 @@ __gather_linux_system_info() {
[ "$n" = "$DISTRO_NAME" ] && DISTRO_NAME="" || DISTRO_NAME="$n" [ "$n" = "$DISTRO_NAME" ] && DISTRO_NAME="" || DISTRO_NAME="$n"
elif [ "${DISTRO_NAME}" = "openSUSE project" ]; then elif [ "${DISTRO_NAME}" = "openSUSE project" ]; then
# lsb_release -si returns "openSUSE project" on openSUSE 12.3 # lsb_release -si returns "openSUSE project" on openSUSE 12.3
# lsb_release -si returns "openSUSE" on openSUSE 15.n # lsb_release -si returns "openSUSE" on openSUSE 15.n
DISTRO_NAME="opensuse" DISTRO_NAME="opensuse"
elif [ "${DISTRO_NAME}" = "SUSE LINUX" ]; then elif [ "${DISTRO_NAME}" = "SUSE LINUX" ]; then
if [ "$(lsb_release -sd | grep -i opensuse)" != "" ]; then if [ "$(lsb_release -sd | grep -i opensuse)" != "" ]; then
@ -1733,11 +1727,7 @@ elif [ "${DISTRO_NAME_L}" = "debian" ]; then
__debian_codename_translation __debian_codename_translation
fi fi
# Only Ubuntu has daily packages, let's let users know about that if ([ "$(echo "${DISTRO_NAME_L}" | grep -E '(debian|ubuntu|centos|red_hat|oracle|scientific|amazon)')" = "" ] && [ "$ITYPE" = "stable" ] && [ "$STABLE_REV" != "latest" ]); then
if ([ "${DISTRO_NAME_L}" != "ubuntu" ] && [ "$ITYPE" = "daily" ]); then
echoerror "${DISTRO_NAME} does not have daily packages support"
exit 1
elif ([ "$(echo "${DISTRO_NAME_L}" | grep -E '(debian|ubuntu|centos|red_hat|oracle|scientific|amazon)')" = "" ] && [ "$ITYPE" = "stable" ] && [ "$STABLE_REV" != "latest" ]); then
echoerror "${DISTRO_NAME} does not have major version pegged packages support" echoerror "${DISTRO_NAME} does not have major version pegged packages support"
exit 1 exit 1
fi fi
@ -2722,24 +2712,6 @@ install_ubuntu_stable_deps() {
install_ubuntu_deps || return 1 install_ubuntu_deps || return 1
} }
install_ubuntu_daily_deps() {
__wait_for_apt
install_ubuntu_stable_deps || return 1
if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then
__enable_universe_repository || return 1
add-apt-repository -y ppa:saltstack/salt-daily || return 1
apt-get update || return 1
fi
if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then
__apt_get_upgrade_noinput || return 1
fi
return 0
}
install_ubuntu_git_deps() { install_ubuntu_git_deps() {
__wait_for_apt __wait_for_apt
apt-get update || return 1 apt-get update || return 1
@ -2828,12 +2800,6 @@ install_ubuntu_stable() {
return 0 return 0
} }
install_ubuntu_daily() {
install_ubuntu_stable || return 1
return 0
}
install_ubuntu_git() { install_ubuntu_git() {
# Activate virtualenv before install # Activate virtualenv before install
if [ "${_VIRTUALENV_DIR}" != "null" ]; then if [ "${_VIRTUALENV_DIR}" != "null" ]; then

View file

@ -270,39 +270,6 @@ class InstallationTestCase(BootstrapTestCase):
) )
) )
def test_install_daily(self):
args = []
if requires_pip_based_installations():
args.append('-P')
args.append('daily')
rc, out, err = self.run_script(
args=args, timeout=15 * 60, stream_stds=True
)
if GRAINS['os'] in ('Ubuntu', 'Trisquel', 'Mint'):
self.assert_script_result(
'Failed to install daily',
0, (rc, out, err)
)
# Try to get the versions report
self.assert_script_result(
'Failed to get the versions report (\'--versions-report\')',
0,
self.run_script(
script=None,
args=('salt-minion', '--versions-report'),
timeout=15 * 60,
stream_stds=True
)
)
else:
self.assert_script_result(
'Although system is not Ubuntu, we managed to install',
1, (rc, out, err)
)
def test_install_testing(self): def test_install_testing(self):
args = [] args = []
if requires_pip_based_installations(): if requires_pip_based_installations():