From d5fc82ea247c96744ac7610476f5df10614f3668 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Wed, 29 Jan 2020 20:09:38 +1000 Subject: [PATCH] Do not fail the build when a mirror is not found Forgot to include this check in the change 4c9db8e41b3b546a52. netselect checks for the mirrors from the list and when one or more mirrors are not available returns the below error causing the build to fail. error: netselect: unknown host gpl.savoirfairelinux.net/pub/mirrors/ubuntu/ Issue: RELENG-2642 Change-Id: I4351a40be996092febe4efe956b18a9a575c994e Signed-off-by: Anil Belur --- provision/install-python.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/provision/install-python.sh b/provision/install-python.sh index 464f318..040f8ba 100755 --- a/provision/install-python.sh +++ b/provision/install-python.sh @@ -38,7 +38,9 @@ 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 echo "Installing python-minimal..." -- 2.16.6