From: Zack Cerza Date: Fri, 2 Dec 2022 20:36:33 +0000 (-0700) Subject: bootstrap: Rebuild wrong-python venvs X-Git-Tag: 1.2.0~138^2~7 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8af6acde7e174db45d87171b00ff3c30b1a155d3;p=teuthology.git bootstrap: Rebuild wrong-python venvs Signed-off-by: Zack Cerza --- diff --git a/bootstrap b/bootstrap index 53266cba3b..060301d380 100755 --- a/bootstrap +++ b/bootstrap @@ -17,6 +17,7 @@ if [[ "$PYTHON" =~ "python2" ]]; then fi PYTHON=${PYTHON:-"python3"} +PYTHON_VER_OUT=$($PYTHON --version) PYTHON_BIN=$(command -v $PYTHON) if [ -z $PYTHON_BIN -o ! -e $PYTHON_BIN -o ! -x $PYTHON_BIN ]; then echo "Cannot find $PYTHON!" @@ -167,7 +168,10 @@ fi export LC_ALL=en_US.UTF-8 -if [ -z "$NO_CLOBBER" ] && [ ! -e "./$VENV/bin/pip" ]; then +if [ -z "$NO_CLOBBER" ] && \ + [ ! -e "./$VENV/bin/pip" -o ! -e "./$VENV/bin/$PYTHON" ] || \ + [ "${PYTHON_VER_OUT}" != "$(./$VENV/bin/$PYTHON --version)" ] \ + ; then rm -rf virtualenv fi