]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps: remove use of update-alternatives
authorCasey Bodley <cbodley@redhat.com>
Sun, 13 Mar 2022 16:18:45 +0000 (12:18 -0400)
committerKefu Chai <tchaikov@gmail.com>
Sat, 30 Jul 2022 05:02:16 +0000 (13:02 +0800)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
install-deps.sh

index 46acea373b3ad4e80a4897cf68fb44beac070a6c..caf246db2d083fcc576823264844b6cd63d6a160 100755 (executable)
@@ -97,31 +97,6 @@ ENDOFKEY
        $SUDO env DEBIAN_FRONTEND=noninteractive apt-get install -y g++-${new}
     fi
 
-    case "$codename" in
-        trusty)
-            old=4.8;;
-        xenial)
-            old=5;;
-        bionic)
-            old=7;;
-    esac
-    $SUDO update-alternatives --remove-all gcc || true
-    $SUDO update-alternatives \
-        --install /usr/bin/gcc gcc /usr/bin/gcc-${new} 20 \
-        --slave   /usr/bin/g++ g++ /usr/bin/g++-${new}
-
-    if [ -f /usr/bin/g++-${old} ]; then
-      $SUDO update-alternatives \
-        --install /usr/bin/gcc gcc /usr/bin/gcc-${old} 10 \
-        --slave   /usr/bin/g++ g++ /usr/bin/g++-${old}
-    fi
-
-    $SUDO update-alternatives --auto gcc
-
-    # cmake uses the latter by default
-    $SUDO ln -nsf /usr/bin/gcc /usr/bin/${ARCH}-linux-gnu-gcc
-    $SUDO ln -nsf /usr/bin/g++ /usr/bin/${ARCH}-linux-gnu-g++
-
     in_jenkins && echo "CI_DEBUG: End ensure_decent_gcc_on_ubuntu() in install-deps.sh"
 }