aee18c749b
Check that function calls look like ^function foo {$ in bash8, and fix all existing failures of that check. Add a note to HACKING.rst Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
84 lines
2.1 KiB
Plaintext
84 lines
2.1 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
|
|
# --------
|
|
CLIFF_DIR=$DEST/cliff
|
|
OSLOCFG_DIR=$DEST/oslo.config
|
|
OSLOMSG_DIR=$DEST/oslo.messaging
|
|
OSLORWRAP_DIR=$DEST/oslo.rootwrap
|
|
OSLOVMWARE_DIR=$DEST/oslo.vmware
|
|
PYCADF_DIR=$DEST/pycadf
|
|
STEVEDORE_DIR=$DEST/stevedore
|
|
TASKFLOW_DIR=$DEST/taskflow
|
|
|
|
# Entry Points
|
|
# ------------
|
|
|
|
# install_oslo() - Collect source and prepare
|
|
function install_oslo {
|
|
# TODO(sdague): remove this once we get to Icehouse, this just makes
|
|
# for a smoother transition of existing users.
|
|
cleanup_oslo
|
|
|
|
git_clone $CLIFF_REPO $CLIFF_DIR $CLIFF_BRANCH
|
|
setup_develop $CLIFF_DIR
|
|
|
|
git_clone $OSLOCFG_REPO $OSLOCFG_DIR $OSLOCFG_BRANCH
|
|
setup_develop $OSLOCFG_DIR
|
|
|
|
git_clone $OSLOMSG_REPO $OSLOMSG_DIR $OSLOMSG_BRANCH
|
|
setup_develop $OSLOMSG_DIR
|
|
|
|
git_clone $OSLORWRAP_REPO $OSLORWRAP_DIR $OSLORWRAP_BRANCH
|
|
setup_develop $OSLORWRAP_DIR
|
|
|
|
git_clone $OSLOVMWARE_REPO $OSLOVMWARE_DIR $OSLOVMWARE_BRANCH
|
|
setup_develop $OSLOVMWARE_DIR
|
|
|
|
git_clone $PYCADF_REPO $PYCADF_DIR $PYCADF_BRANCH
|
|
setup_develop $PYCADF_DIR
|
|
|
|
git_clone $STEVEDORE_REPO $STEVEDORE_DIR $STEVEDORE_BRANCH
|
|
setup_develop $STEVEDORE_DIR
|
|
|
|
git_clone $TASKFLOW_REPO $TASKFLOW_DIR $TASKFLOW_BRANCH
|
|
setup_develop $TASKFLOW_DIR
|
|
}
|
|
|
|
# cleanup_oslo() - purge possibly old versions of oslo
|
|
function cleanup_oslo {
|
|
# this means we've got an old oslo installed, lets get rid of it
|
|
if ! python -c 'import oslo.config' 2>/dev/null; then
|
|
echo "Found old oslo.config... removing to ensure consistency"
|
|
local PIP_CMD=$(get_pip_command)
|
|
pip_install oslo.config
|
|
sudo $PIP_CMD uninstall -y oslo.config
|
|
fi
|
|
}
|
|
|
|
# Restore xtrace
|
|
$XTRACE
|
|
|
|
# Tell emacs to use shell-script-mode
|
|
## Local variables:
|
|
## mode: shell-script
|
|
## End:
|