introduce pip_install_gr
This creates a new pip_install_gr that installs from global requirements allowed versions. Now that stable branches are getting capped all of devstack needs to be fixed to do things like this. Change-Id: I8fd0ef2bfc544ca2576fab09d3018f760b8848fe
This commit is contained in:
parent
d1549d624d
commit
60996b1b60
14
inc/python
14
inc/python
@ -52,6 +52,18 @@ function get_python_exec_prefix {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Wrapper for ``pip install`` that only installs versions of libraries
|
||||||
|
# from the global-requirements specification.
|
||||||
|
#
|
||||||
|
# Uses globals ``REQUIREMENTS_DIR``
|
||||||
|
#
|
||||||
|
# pip_install_gr packagename
|
||||||
|
function pip_install_gr {
|
||||||
|
local name=$1
|
||||||
|
local clean_name=$(get_from_global_requirements $name)
|
||||||
|
pip_install $clean_name
|
||||||
|
}
|
||||||
|
|
||||||
# Wrapper for ``pip install`` to set cache and proxy environment variables
|
# Wrapper for ``pip install`` to set cache and proxy environment variables
|
||||||
# Uses globals ``OFFLINE``, ``PIP_VIRTUAL_ENV``,
|
# Uses globals ``OFFLINE``, ``PIP_VIRTUAL_ENV``,
|
||||||
# ``PIP_UPGRADE``, ``TRACK_DEPENDS``, ``*_proxy``
|
# ``PIP_UPGRADE``, ``TRACK_DEPENDS``, ``*_proxy``
|
||||||
@ -125,7 +137,7 @@ function pip_install {
|
|||||||
# get_from_global_requirements <package>
|
# get_from_global_requirements <package>
|
||||||
function get_from_global_requirements {
|
function get_from_global_requirements {
|
||||||
local package=$1
|
local package=$1
|
||||||
local required_pkg=$(grep -h ${package} $REQUIREMENTS_DIR/global-requirements.txt | cut -d\# -f1)
|
local required_pkg=$(grep -h ^${package} $REQUIREMENTS_DIR/global-requirements.txt | cut -d\# -f1)
|
||||||
if [[ $required_pkg == "" ]]; then
|
if [[ $required_pkg == "" ]]; then
|
||||||
die $LINENO "Can't find package $package in requirements"
|
die $LINENO "Can't find package $package in requirements"
|
||||||
fi
|
fi
|
||||||
|
@ -315,6 +315,9 @@ function install_ceilometermiddleware {
|
|||||||
git_clone_by_name "ceilometermiddleware"
|
git_clone_by_name "ceilometermiddleware"
|
||||||
setup_dev_lib "ceilometermiddleware"
|
setup_dev_lib "ceilometermiddleware"
|
||||||
else
|
else
|
||||||
|
# BUG: this should be a pip_install_gr except it was never
|
||||||
|
# included in global-requirements. Needs to be fixed by
|
||||||
|
# https://bugs.launchpad.net/ceilometer/+bug/1441655
|
||||||
pip_install ceilometermiddleware
|
pip_install ceilometermiddleware
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ EOF
|
|||||||
|
|
||||||
function install_database_python_mysql {
|
function install_database_python_mysql {
|
||||||
# Install Python client module
|
# Install Python client module
|
||||||
pip_install MySQL-python
|
pip_install_gr MySQL-python
|
||||||
ADDITIONAL_VENV_PACKAGES+=",MySQL-python"
|
ADDITIONAL_VENV_PACKAGES+=",MySQL-python"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ EOF
|
|||||||
|
|
||||||
function install_database_python_postgresql {
|
function install_database_python_postgresql {
|
||||||
# Install Python client module
|
# Install Python client module
|
||||||
pip_install psycopg2
|
pip_install_gr psycopg2
|
||||||
ADDITIONAL_VENV_PACKAGES+=",psycopg2"
|
ADDITIONAL_VENV_PACKAGES+=",psycopg2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ function stop_horizon {
|
|||||||
# NOTE: It can be moved to common functions, but it is only used by compilation
|
# NOTE: It can be moved to common functions, but it is only used by compilation
|
||||||
# of django_openstack_auth catalogs at the moment.
|
# of django_openstack_auth catalogs at the moment.
|
||||||
function _prepare_message_catalog_compilation {
|
function _prepare_message_catalog_compilation {
|
||||||
pip_install $(get_from_global_requirements Babel)
|
pip_install_gr Babel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ function install_ironicclient {
|
|||||||
sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-ironicclient"]}/tools/,/etc/bash_completion.d/}ironic.bash_completion
|
sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-ironicclient"]}/tools/,/etc/bash_completion.d/}ironic.bash_completion
|
||||||
else
|
else
|
||||||
# nothing actually "requires" ironicclient, so force instally from pypi
|
# nothing actually "requires" ironicclient, so force instally from pypi
|
||||||
pip_install python-ironicclient
|
pip_install_gr python-ironicclient
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -729,7 +729,7 @@ function upload_baremetal_ironic_deploy {
|
|||||||
|
|
||||||
# install diskimage-builder
|
# install diskimage-builder
|
||||||
if [[ $(type -P ramdisk-image-create) == "" ]]; then
|
if [[ $(type -P ramdisk-image-create) == "" ]]; then
|
||||||
pip_install diskimage_builder
|
pip_install_gr "diskimage-builder"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$IRONIC_DEPLOY_KERNEL" -o -z "$IRONIC_DEPLOY_RAMDISK" ]; then
|
if [ -z "$IRONIC_DEPLOY_KERNEL" -o -z "$IRONIC_DEPLOY_RAMDISK" ]; then
|
||||||
|
@ -524,7 +524,7 @@ function install_keystonemiddleware {
|
|||||||
setup_dev_lib "keystonemiddleware"
|
setup_dev_lib "keystonemiddleware"
|
||||||
else
|
else
|
||||||
# When not installing from repo, keystonemiddleware is still needed...
|
# When not installing from repo, keystonemiddleware is still needed...
|
||||||
pip_install keystonemiddleware
|
pip_install_gr keystonemiddleware
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
lib/ldap
2
lib/ldap
@ -142,7 +142,7 @@ function install_ldap {
|
|||||||
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif
|
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pip_install ldappool
|
pip_install_gr ldappool
|
||||||
|
|
||||||
rm -rf $tmp_ldap_dir
|
rm -rf $tmp_ldap_dir
|
||||||
}
|
}
|
||||||
|
@ -31,12 +31,12 @@ function install_libvirt {
|
|||||||
install_package python-guestfs
|
install_package python-guestfs
|
||||||
fi
|
fi
|
||||||
install_package libvirt-bin libvirt-dev
|
install_package libvirt-bin libvirt-dev
|
||||||
pip_install libvirt-python
|
pip_install_gr libvirt-python
|
||||||
#pip_install <there-si-no-guestfs-in-pypi>
|
#pip_install_gr <there-si-no-guestfs-in-pypi>
|
||||||
elif is_fedora || is_suse; then
|
elif is_fedora || is_suse; then
|
||||||
install_package kvm
|
install_package kvm
|
||||||
install_package libvirt libvirt-devel
|
install_package libvirt libvirt-devel
|
||||||
pip_install libvirt-python
|
pip_install_gr libvirt-python
|
||||||
install_package python-libguestfs
|
install_package python-libguestfs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ CRONTAB
|
|||||||
|
|
||||||
# install_nova_hypervisor() - Install external components
|
# install_nova_hypervisor() - Install external components
|
||||||
function install_nova_hypervisor {
|
function install_nova_hypervisor {
|
||||||
pip_install xenapi
|
pip_install_gr xenapi
|
||||||
}
|
}
|
||||||
|
|
||||||
# start_nova_hypervisor - Start any required external services
|
# start_nova_hypervisor - Start any required external services
|
||||||
|
@ -141,7 +141,7 @@ function install_rpc_backend {
|
|||||||
# TODO(kgiusti) can remove once python qpid bindings are
|
# TODO(kgiusti) can remove once python qpid bindings are
|
||||||
# available on all supported platforms _and_ pyngus is added
|
# available on all supported platforms _and_ pyngus is added
|
||||||
# to the requirements.txt file in oslo.messaging
|
# to the requirements.txt file in oslo.messaging
|
||||||
pip_install pyngus
|
pip_install_gr pyngus
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if is_service_enabled rabbit; then
|
if is_service_enabled rabbit; then
|
||||||
|
@ -103,7 +103,7 @@ function configure_tempest {
|
|||||||
setup_develop $TEMPEST_DIR
|
setup_develop $TEMPEST_DIR
|
||||||
else
|
else
|
||||||
# install testr since its used to process tempest logs
|
# install testr since its used to process tempest logs
|
||||||
pip_install $(get_from_global_requirements testrepository)
|
pip_install_gr testrepository
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local image_lines
|
local image_lines
|
||||||
|
@ -140,10 +140,10 @@ function configure_zaqar {
|
|||||||
function configure_redis {
|
function configure_redis {
|
||||||
if is_ubuntu; then
|
if is_ubuntu; then
|
||||||
install_package redis-server
|
install_package redis-server
|
||||||
pip_install redis
|
pip_install_gr redis
|
||||||
elif is_fedora; then
|
elif is_fedora; then
|
||||||
install_package redis
|
install_package redis
|
||||||
pip_install redis
|
pip_install_gr redis
|
||||||
else
|
else
|
||||||
exit_distro_not_supported "redis installation"
|
exit_distro_not_supported "redis installation"
|
||||||
fi
|
fi
|
||||||
|
@ -77,7 +77,7 @@ function stop_elasticsearch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function install_elasticsearch {
|
function install_elasticsearch {
|
||||||
pip_install elasticsearch
|
pip_install_gr elasticsearch
|
||||||
if is_package_installed elasticsearch; then
|
if is_package_installed elasticsearch; then
|
||||||
echo "Note: elasticsearch was already installed."
|
echo "Note: elasticsearch was already installed."
|
||||||
return
|
return
|
||||||
|
2
stack.sh
2
stack.sh
@ -847,7 +847,7 @@ if use_library_from_git "python-openstackclient"; then
|
|||||||
git_clone_by_name "python-openstackclient"
|
git_clone_by_name "python-openstackclient"
|
||||||
setup_dev_lib "python-openstackclient"
|
setup_dev_lib "python-openstackclient"
|
||||||
else
|
else
|
||||||
pip_install 'python-openstackclient>=1.0.2'
|
pip_install_gr python-openstackclient
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $TRACK_DEPENDS = True ]]; then
|
if [[ $TRACK_DEPENDS = True ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user