From 721ef48fbf66e375af583710117f5c3bfbace9b9 Mon Sep 17 00:00:00 2001 From: git-harry Date: Mon, 7 Mar 2016 13:00:20 +0000 Subject: [PATCH] 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 --- scripts/scripts-library.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/scripts-library.sh b/scripts/scripts-library.sh index 1514070740..d3821192aa 100755 --- a/scripts/scripts-library.sh +++ b/scripts/scripts-library.sh @@ -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