From 944b28280b86bba7592b1c7a2032dbd0eaa39014 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Wed, 1 Oct 2014 18:21:08 -0700 Subject: [PATCH] Drop workaround for pip < 1.4 Now that we are on pip 1.5.6 lets drop the workaround to make pip 1.4 work. As this is a development/testing tool requiring a newer pip shouldn't be an issue. Also stack.sh installs pip by default. Work around introduced in https://github.com/pypa/pip/issues/709 Change-Id: I0e7aad1d21f4fce4c020ce36685bb56893c66bdc --- functions | 11 ----------- functions-common | 9 --------- unstack.sh | 2 -- 3 files changed, 22 deletions(-) diff --git a/functions b/functions index 376aff05e3..bbde27d9f6 100644 --- a/functions +++ b/functions @@ -21,17 +21,6 @@ function function_exists { declare -f -F $1 > /dev/null } - -# Cleanup anything from /tmp on unstack -# clean_tmp -function cleanup_tmp { - local tmp_dir=${TMPDIR:-/tmp} - - # see comments in pip_install - sudo rm -rf ${tmp_dir}/pip-build.* -} - - # Retrieve an image from a URL and upload into Glance. # Uses the following variables: # diff --git a/functions-common b/functions-common index 4c61d6a8d2..6d1c6958dc 100644 --- a/functions-common +++ b/functions-common @@ -1509,15 +1509,6 @@ function pip_install { pip_mirror_opt="--use-mirrors" fi - # pip < 1.4 has a bug where it will use an already existing build - # directory unconditionally. Say an earlier component installs - # foo v1.1; pip will have built foo's source in - # /tmp/$USER-pip-build. Even if a later component specifies foo < - # 1.1, the existing extracted build will be used and cause - # confusing errors. By creating unique build directories we avoid - # this problem. See https://github.com/pypa/pip/issues/709 - local pip_build_tmp=$(mktemp --tmpdir -d pip-build.XXXXX) - $xtrace $sudo_pip PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \ http_proxy=$http_proxy \ diff --git a/unstack.sh b/unstack.sh index adb6dc17ca..fee608e17b 100755 --- a/unstack.sh +++ b/unstack.sh @@ -173,5 +173,3 @@ if [[ -n "$SCREEN" ]]; then screen -X -S $SESSION quit fi fi - -cleanup_tmp