]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
scripts: Always reinstall python3 and always set alternatives to auto 1998/head
authorDavid Galloway <dgallowa@redhat.com>
Thu, 12 May 2022 19:39:10 +0000 (15:39 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 12 May 2022 19:39:10 +0000 (15:39 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
scripts/build_utils.sh

index 2936d04854a16a1d7933df45bd4100a89a656dd9..60d8d558a8590eecd6bbd3c3fa460083a13093e2 100644 (file)
@@ -1660,5 +1660,6 @@ function set_centos_python3_version() {
     for package in $(rpm -qa | grep -E '^python3[1-9]{1,3}' | grep -v $EXPECTED_PYTHON3_VERSION_MASHED); do
         sudo dnf remove -y $package
     done
-    sudo dnf install -y $EXPECTED_PYTHON3_VERSION || sudo dnf reinstall -y $EXPECTED_PYTHON3_VERSION
+    sudo dnf reinstall -y $EXPECTED_PYTHON3_VERSION || sudo dnf install -y $EXPECTED_PYTHON3_VERSION
+    sudo alternatives --auto python3
 }