Bypass repo server if missing pip upgrade packages

The function get_pip upgrades the pip packages for pip. If OSA is
updated to require newer versions these may not be present on the repo
server and this will cause bootstrap-ansible.sh to fail.

Update the get_pip function to fallback on calling pip with the
--isolated flag when pip is installed and the pip packages are being
upgraded.

Change-Id: Ifa644b9bf6aa8b20028eb0257c40fe20f3ab1a3b
This commit is contained in:
git-harry 2016-03-07 13:00:20 +00:00 committed by Steve Lewis
parent 65061307c0
commit 721ef48fbf
1 changed files with 3 additions and 1 deletions

View File

@ -217,7 +217,9 @@ function get_pip {
if [ "$(which pip)" ]; then
# make sure that the right pip base packages are installed
pip install --upgrade ${PIP_INSTALL_OPTIONS}
# If this fails retry with --isolated to bypass the repo server because the repo server will not have
# been updated at this point to include any newer pip packages.
pip install --upgrade ${PIP_INSTALL_OPTIONS} || pip install --upgrade --isolated ${PIP_INSTALL_OPTIONS}
# when pip is not installed, install it
else