provision: Move apt-get update from retry handler to setup-apt-repo.

This avoids unnecessarily alarming error messages if the apt cache is
missing.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2019-05-24 16:09:00 -07:00
committed by Tim Abbott
parent ae524b677d
commit 407564086d
2 changed files with 15 additions and 19 deletions

View File

@@ -27,7 +27,11 @@ touch "$SOURCES_FILE"
# Hash it to check if the sources file is changed by the script later.
zulip_source_hash=$(sha1sum "$SOURCES_FILE")
apt-get install -y lsb-release apt-transport-https gnupg
pre_setup_deps=(lsb-release apt-transport-https gnupg)
if ! apt-get -s install "${pre_setup_deps[@]}" > /dev/null 2>&1; then
apt-get update
fi
apt-get -y install "${pre_setup_deps[@]}"
SCRIPTS_PATH="$(dirname "$(dirname "$0")")"