Update install-python.sh for Ubuntu 24.04+ 00/73500/1 v0.16.8
authorEric Ball <eball@linuxfoundation.org>
Wed, 11 Jun 2025 22:06:56 +0000 (15:06 -0700)
committerEric Ball <eball@linuxfoundation.org>
Wed, 11 Jun 2025 22:13:21 +0000 (15:13 -0700)
Running install-python.sh on Ubuntu 24.04 fails during the netselect/
select_fastest step. This can be safely skipped on 24.04, but is still
useful up to 22.04, so we check lsb-release for a DISTRIB_RELEASE
major version less than 24.04 before entering the step.

This also includes a small fix to indentation in the case block (lines
were previously indented to 3 spaces instead of 4).

Change-Id: I4ffb398d78abcd3cf1bd1ec14a034b21d66ebab3
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
provision/install-python.sh

index 71a130b..c68f872 100755 (executable)
@@ -75,16 +75,19 @@ if is_ubuntu; then
 
     case $_ARCH in
         x86_64)
-           NETSELECT_DEB="netselect_0.3.ds1-28+b1_amd64.deb"
-           echo "NetSelect version to install is ${NETSELECT_DEB}"
-           select_fastest
-           ;;
+            source /etc/lsb-release
+            if [[ ${DISTRIB_RELEASE:0:2} -lt 24 ]]; then
+                NETSELECT_DEB="netselect_0.3.ds1-28+b1_amd64.deb"
+                echo "NetSelect version to install is ${NETSELECT_DEB}"
+                select_fastest
+            fi
+            ;;
         aarch64)
-           #NETSELECT_DEB="netselect_0.3.ds1-28+b1_arm64.deb"
-           ;;
+            #NETSELECT_DEB="netselect_0.3.ds1-28+b1_arm64.deb"
+            ;;
         *)
-           echo "Unknown arch ${_ARCH}. Exiting..."
-           exit 1
+            echo "Unknown arch ${_ARCH}. Exiting..."
+            exit 1
     esac