From 7a9f801eb1ef77008a1fd146a8ed826959e96b99 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Tue, 16 Feb 2021 10:24:58 -0500 Subject: [PATCH] [fix] Add more `apt-get update` commands Fixes #2962 --- setup/so-functions | 3 +++ setup/so-setup | 1 + 2 files changed, 4 insertions(+) diff --git a/setup/so-functions b/setup/so-functions index 6c57f3851..4d5e85273 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -970,6 +970,7 @@ installer_prereq_packages() { elif [ "$OS" == ubuntu ]; then # Print message to stdout so the user knows setup is doing something echo "Installing required packages to run installer..." + retry 50 10 "apt-get update" >> "$setup_log" 2>&1 || exit 1 # Install network manager so we can do interface stuff if ! command -v nmcli > /dev/null 2>&1; then retry 50 10 "apt-get -y install network-manager" >> "$setup_log" 2>&1 || exit 1 @@ -1961,6 +1962,8 @@ saltify() { exit 1 fi + retry 50 10 "apt-get update" >> "$setup_log" 2>&1 || exit 1 + if [ $OSVER != "xenial" ]; then # Switch to Python 3 as default if this is not xenial update-alternatives --install /usr/bin/python python /usr/bin/python3.6 10 >> "$setup_log" 2>&1 diff --git a/setup/so-setup b/setup/so-setup index 548d9e7f4..691e70709 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -130,6 +130,7 @@ if [[ -f automation/$automation && $(basename $automation) == $automation ]]; th if [[ ! $is_iso ]]; then echo "Installing sshpass for automated testing." >> $setup_log 2>&1 if [ "$OS" == ubuntu ]; then + retry 50 10 "apt-get update" >> "$setup_log" 2>&1 || exit 1 retry 50 10 "apt-get -y install sshpass" >> $setup_log 2>&1 || exit 1 else yum -y install sshpass >> $setup_log 2>&1