
This patch provides a new path for installing libraries in devstack so that it's possible to either test with upstream released libraries, or with git versions of individual libraries. Libraries are added by name to 3 associative arrays GITREPO, GITBRANCH, GITDIR. When we get to the library install phase we inspect LIBS_FROM_GIT and look for libraries by name (i.e. "oslo.config") and if they exist we'll clone and install those libraries from git. Otherwise we won't, and just let pip pull them as dependencies when it needs them. This patch provides the conversion of the oslo libraries, including pbr. Devstack-gate jobs for these libraries will need to change to support actually forward testing their content. Change-Id: I6161fa3194dbe8fbc25b6ee0e2fe3cc722a1cea4
79 lines
2.0 KiB
Plaintext
79 lines
2.0 KiB
Plaintext
# lib/oslo
|
|
#
|
|
# Functions to install oslo libraries from git
|
|
#
|
|
# We need this to handle the fact that projects would like to use
|
|
# pre-released versions of oslo libraries.
|
|
|
|
# Dependencies:
|
|
#
|
|
# - ``functions`` file
|
|
|
|
# ``stack.sh`` calls the entry points in this order:
|
|
#
|
|
# - install_oslo
|
|
|
|
# Save trace setting
|
|
XTRACE=$(set +o | grep xtrace)
|
|
set +o xtrace
|
|
|
|
|
|
# Defaults
|
|
# --------
|
|
GITDIR["cliff"]=$DEST/cliff
|
|
GITDIR["oslo.config"]=$DEST/oslo.config
|
|
GITDIR["oslo.concurrency"]=$DEST/oslo.concurrency
|
|
GITDIR["oslo.db"]=$DEST/oslo.db
|
|
GITDIR["oslo.i18n"]=$DEST/oslo.i18n
|
|
GITDIR["oslo.log"]=$DEST/oslo.log
|
|
GITDIR["oslo.middleware"]=$DEST/oslo.middleware
|
|
GITDIR["oslo.messaging"]=$DEST/oslo.messaging
|
|
GITDIR["oslo.rootwrap"]=$DEST/oslo.rootwrap
|
|
GITDIR["oslo.serialization"]=$DEST/oslo.serialization
|
|
GITDIR["oslo.utils"]=$DEST/oslo.utils
|
|
GITDIR["oslo.vmware"]=$DEST/oslo.vmware
|
|
GITDIR["pycadf"]=$DEST/pycadf
|
|
GITDIR["stevedore"]=$DEST/stevedore
|
|
GITDIR["taskflow"]=$DEST/taskflow
|
|
|
|
# Support entry points installation of console scripts
|
|
OSLO_BIN_DIR=$(get_python_exec_prefix)
|
|
|
|
# Entry Points
|
|
# ------------
|
|
|
|
function _do_install_oslo_lib {
|
|
local name=$1
|
|
if use_library_from_git "$name"; then
|
|
git_clone_by_name "$name"
|
|
setup_lib "$name"
|
|
fi
|
|
}
|
|
|
|
# install_oslo() - Collect source and prepare
|
|
function install_oslo {
|
|
_do_install_oslo_lib "cliff"
|
|
_do_install_oslo_lib "oslo.i18n"
|
|
_do_install_oslo_lib "oslo.utils"
|
|
_do_install_oslo_lib "oslo.serialization"
|
|
_do_install_oslo_lib "oslo.config"
|
|
_do_install_oslo_lib "oslo.concurrency"
|
|
_do_install_oslo_lib "oslo.log"
|
|
_do_install_oslo_lib "oslo.middleware"
|
|
_do_install_oslo_lib "oslo.messaging"
|
|
_do_install_oslo_lib "oslo.rootwrap"
|
|
_do_install_oslo_lib "oslo.db"
|
|
_do_install_oslo_lib "olso.vmware"
|
|
_do_install_oslo_lib "pycadf"
|
|
_do_install_oslo_lib "stevedore"
|
|
_do_install_oslo_lib "taskflow"
|
|
}
|
|
|
|
# Restore xtrace
|
|
$XTRACE
|
|
|
|
# Tell emacs to use shell-script-mode
|
|
## Local variables:
|
|
## mode: shell-script
|
|
## End:
|