aboutsummaryrefslogtreecommitdiff
path: root/lkft
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2020-12-14 05:32:39 +0000
committerYongqin Liu <yongqin.liu@linaro.org>2020-12-14 05:33:05 +0000
commit47772ff694a07b657730fde18209c9f5bd5492cc (patch)
treef934ba1f59db5d97666d3f0547fabf373f533e38 /lkft
parentd296c5b5e2b92919100dca12fa0d043c5fc480d3 (diff)
Revert "builders-v2.sh: force to use python2 temporarily"
This reverts commit 44d2454c4b4522c48f33371bc2eefbedb3a6d3a1. Reason for revert: change to use python3 by default with the ubuntu 18.04 os Change-Id: I24e2f7e89bc68e8f7a8635f3d9b77e17efd0f435
Diffstat (limited to 'lkft')
-rwxr-xr-xlkft/common/builders-v2.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/lkft/common/builders-v2.sh b/lkft/common/builders-v2.sh
index c7e0d4410d..fa7e808a86 100755
--- a/lkft/common/builders-v2.sh
+++ b/lkft/common/builders-v2.sh
@@ -23,15 +23,16 @@ git config --global user.email "ci_notify@linaro.org"
git config --global user.name "Linaro CI"
#change to use python3 by default
-# force to use python2 as a workaround with the master branch of repo repository
-sudo rm -fv /usr/bin/python && sudo ln -s /usr/bin/python2 /usr/bin/python
+if ! python --version|grep 3; then
+ sudo rm -fv /usr/bin/python && sudo ln -s /usr/bin/python3 /usr/bin/python
+fi
if ! sudo DEBIAN_FRONTEND=noninteractive apt-get -q=2 update; then
echo "INFO: apt update error - try again in a moment"
sleep 15
sudo DEBIAN_FRONTEND=noninteractive apt-get -q=2 update || true
fi
-pkg_list="python-pip openssl libssl-dev coreutils"
+pkg_list="python3-pip openssl libssl-dev coreutils"
if ! sudo DEBIAN_FRONTEND=noninteractive apt-get -q=2 install -y ${pkg_list}; then
echo "INFO: apt install error - try again in a moment"
sleep 15
@@ -39,7 +40,7 @@ if ! sudo DEBIAN_FRONTEND=noninteractive apt-get -q=2 install -y ${pkg_list}; th
fi
# Install ruamel.yaml
-pip install --user --force-reinstall ruamel.yaml
+pip3 install --user --force-reinstall ruamel.yaml
sudo apt-get update
sudo apt-get install -y selinux-utils cpio