|
...
|
...
|
@@ -42,9 +42,21 @@ function get_versions {
|
|
42
|
42
|
|
|
43
|
43
|
|
|
44
|
44
|
function install_get_pip {
|
|
45
|
|
- if [[ ! -r $LOCAL_PIP ]]; then
|
|
46
|
|
- curl --retry 6 --retry-delay 5 -o $LOCAL_PIP $PIP_GET_PIP_URL || \
|
|
|
45
|
+ # the openstack gate and others put a cached version of get-pip.py
|
|
|
46
|
+ # for this to find, explicitly to avoid download issues.
|
|
|
47
|
+ #
|
|
|
48
|
+ # However, if devstack *did* download the file, we want to check
|
|
|
49
|
+ # for updates; people can leave thier stacks around for a long
|
|
|
50
|
+ # time and in the mean-time pip might get upgraded.
|
|
|
51
|
+ #
|
|
|
52
|
+ # Thus we use curl's "-z" feature to always check the modified
|
|
|
53
|
+ # since and only download if a new version is out -- but only if
|
|
|
54
|
+ # it seems we downloaded the file originally.
|
|
|
55
|
+ if [[ ! -r $LOCAL_PIP || -r $LOCAL_PIP.downloaded ]]; then
|
|
|
56
|
+ curl --retry 6 --retry-delay 5 \
|
|
|
57
|
+ -z $LOCAL_PIP -o $LOCAL_PIP $PIP_GET_PIP_URL || \
|
|
47
|
58
|
die $LINENO "Download of get-pip.py failed"
|
|
|
59
|
+ touch $LOCAL_PIP.downloaded
|
|
48
|
60
|
fi
|
|
49
|
61
|
sudo -H -E python $LOCAL_PIP
|
|
50
|
62
|
}
|