From: Tim Johnson Date: Thu, 30 Jan 2020 16:12:45 +0000 (-0800) Subject: Minor Cleanup X-Git-Tag: v0.4.4~2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=037d5f1d9ed2b8bd698f66487c0b085e7475dd55;p=releng%2Fcommon-packer.git Minor Cleanup Change-Id: Ia826901dbbc1a3fd6f5df4af22418015b9dbc78c Signed-off-by: Tim Johnson --- diff --git a/provision/install-python.sh b/provision/install-python.sh index 040f8ba..fc8f240 100755 --- a/provision/install-python.sh +++ b/provision/install-python.sh @@ -38,10 +38,11 @@ if is_ubuntu; then apt install wget -y wget http://ftp.au.debian.org/debian/pool/main/n/netselect/netselect_0.3.ds1-26_amd64.deb dpkg -i netselect_0.3.ds1-26_amd64.deb - set +e # DO NOT cause build failure if any mirrors are not reachable. - netselect -s 20 -t 40 "$(wget -qO - mirrors.ubuntu.com/mirrors.txt)" - set -e - sed -i 's/http:\/\/us.archive.ubuntu.com\/ubuntu\//http:\/\/ubuntu.uberglobalmirror.com\/archive\//' /etc/apt/sources.list + if ! netselect -s 20 -t 40 "$(wget -qO - mirrors.ubuntu.com/mirrors.txt)"; then + echo "NOTE: Unable to refresh 'sources.list'" + fi + sed -i 's#http://us.archive.ubuntu.com/ubuntu#http://ubuntu.uberglobalmirror.com/archive#' \ + /etc/apt/sources.list echo "Installing python-minimal..." apt clean all -y