]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
install-deps: update ensure_decent_gcc_on_rh for gcc-toolset
authorCasey Bodley <cbodley@redhat.com>
Wed, 10 Aug 2022 20:35:01 +0000 (16:35 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 10 Aug 2022 22:07:18 +0000 (18:07 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
install-deps.sh

index 10d8fa452198660ce60a6b0126e09c6b92b6d4be..9ca4667ce1b2ebcac55a9c2c02d9d427d999406f 100755 (executable)
@@ -234,25 +234,22 @@ function version_lt {
 
 function ensure_decent_gcc_on_rh {
     local old=$(gcc -dumpversion)
-    local expected=10.2
     local dts_ver=$1
-    if version_lt $old $expected; then
+    if version_lt $old $dts_ver; then
        if test -t 1; then
            # interactive shell
            cat <<EOF
 Your GCC is too old. Please run following command to add DTS to your environment:
 
-scl enable devtoolset-8 bash
+scl enable gcc-toolset-$dts_ver bash
 
-Or add following line to the end of ~/.bashrc to add it permanently:
+Or add the following line to the end of ~/.bashrc and run "source ~/.bashrc" to add it permanently:
 
-source scl_source enable devtoolset-8
-
-see https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/ for more details.
+source scl_source enable gcc-toolset-$dts_ver
 EOF
        else
            # non-interactive shell
-           source /opt/rh/devtoolset-$dts_ver/enable
+           source /opt/rh/gcc-toolset-$dts_ver/enable
        fi
     fi
 }