From 4f0cf167eceaed3134d0bec14d705bee406b467f Mon Sep 17 00:00:00 2001 From: Ivan Dyachkov Date: Wed, 7 Dec 2022 19:09:38 +0100 Subject: [PATCH] chore: switch to python2 to use yum in tests --- scripts/pkg-tests.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/pkg-tests.sh b/scripts/pkg-tests.sh index 9f3e4d7bd..c511a08e6 100755 --- a/scripts/pkg-tests.sh +++ b/scripts/pkg-tests.sh @@ -148,11 +148,14 @@ emqx_test(){ fi ;; "rpm") + # yum wants python2 + alternatives --list | grep python && alternatives --set python /usr/bin/python2 YUM_RES=$(yum install -y "${PACKAGE_PATH}/${packagename}"| tee /dev/null) if [[ $YUM_RES =~ "Failed" ]]; then echo "yum install failed" exit 1 fi + alternatives --list | grep python && alternatives --set python /usr/bin/python3 if ! rpm -q "${EMQX_NAME}" | grep -q "${EMQX_NAME}"; then echo "package install error" exit 1