Install netselect depending on the Ubuntu arch 47/63147/12 v0.4.4
authorBengt Thuree <bthuree@linuxfoundation.org>
Wed, 19 Feb 2020 01:01:27 +0000 (12:01 +1100)
committerAnil Belur <abelur@linuxfoundation.org>
Wed, 26 Feb 2020 01:44:50 +0000 (11:44 +1000)
Change-Id: Ie93b7b5d510ff1e067db4fcfc1020f9ae93dadcf
Signed-off-by: Bengt Thuree <bthuree@linuxfoundation.org>
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
provision/install-python.sh

index fc8f240..44056c3 100755 (executable)
@@ -34,10 +34,27 @@ if is_ubuntu; then
     # apt{-get} does not refresh the package mirrors (for packer builds run
     # within Jenkins), therefore fails with "E: Unable to locate package
     # python-minimal" while installing python-minimal.
-    echo "Install netselect to choose a mirror."
+    _ARCH="$(uname -m)"
+
+    case $_ARCH in
+        x86_64)
+           NETSELECT_DEB="netselect_0.3.ds1-28+b1_amd64.deb"
+           ;;
+        aarch64)
+           NETSELECT_DEB="netselect_0.3.ds1-28+b1_arm64.deb"
+           ;;
+        *)
+           echo "Unknown arch ${_ARCH}. Exiting..."
+           exit 1
+    esac
+
+    echo "NetSelect version to install is ${NETSELECT_DEB}"
+
+    echo "Install netselect from debian to choose a mirror."
     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
+    wget http://ftp.au.debian.org/debian/pool/main/n/netselect/${NETSELECT_DEB}
+    dpkg -i ${NETSELECT_DEB}
+    apt install netselect -y
     if ! netselect -s 20 -t 40 "$(wget -qO - mirrors.ubuntu.com/mirrors.txt)"; then
         echo "NOTE: Unable to refresh 'sources.list'"
     fi