From 3f3e3fb40a94360744e530229d7f1d606fc68fe9 Mon Sep 17 00:00:00 2001 From: Sergey Skripnick Date: Fri, 29 May 2015 17:09:58 +0300 Subject: [PATCH] Fix reinstalling in rally install script Try to uninstall before installing rally Also wipe all .pyc/.pyo files before installing Change-Id: I693a12d19aea7c9a9d850796f95fed6c315bfa61 Closes-Bug: 1456693 --- install_rally.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install_rally.sh b/install_rally.sh index 920af53ff1..927774588d 100755 --- a/install_rally.sh +++ b/install_rally.sh @@ -661,6 +661,12 @@ BASEDIR=$(dirname "$(readlink -e "$0")") if [ -d "$BASEDIR"/.git ] then SOURCEDIR=$BASEDIR + if find . -regex '.+\.py[co]$' -delete + then + echo "Wiped python compiled files." + else + echo "Warning! Unable to wipe python compiled files" + fi else if [ "$USEVIRTUALENV" = 'yes' ] then @@ -707,6 +713,8 @@ install_db_connector cd "$SOURCEDIR" # Install dependencies pip install -i $BASE_PIP_URL pbr 'tox<=1.6.1' +# Uninstall possible previous version +pip uninstall -y rally || true # Install rally pip install -i $BASE_PIP_URL . cd "$ORIG_WD"