From: Eric Ball Date: Wed, 11 Jun 2025 22:06:56 +0000 (-0700) Subject: Update install-python.sh for Ubuntu 24.04+ X-Git-Tag: v0.16.8^0 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=dc3072c68fe3f168a3f25066799bf329aeda84b3;p=releng%2Fcommon-packer.git Update install-python.sh for Ubuntu 24.04+ 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 --- diff --git a/provision/install-python.sh b/provision/install-python.sh index 71a130b..c68f872 100755 --- a/provision/install-python.sh +++ b/provision/install-python.sh @@ -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