check LIBS_FROM_GIT
after the glance_store vs. upper-constraints bug, it's probably worth actually enforcing and sanity checking that devstack is doing what it's being asked of with LIBS_FROM_GIT. This will hopefully reduce user generated error. This *might* not work with the current oslo naming, we'll have to test and normalize that. Change-Id: Iffef2007f99a0e932b68c4c897ebbfb748cac2b4
This commit is contained in:
parent
2105b9f9ce
commit
c71973eb04
22
inc/python
22
inc/python
@ -157,6 +157,28 @@ function use_library_from_git {
|
|||||||
return $enabled
|
return $enabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# determine if a package was installed from git
|
||||||
|
function lib_installed_from_git {
|
||||||
|
local name=$1
|
||||||
|
pip freeze 2>/dev/null | grep -- "$name" | grep -q -- '-e git'
|
||||||
|
}
|
||||||
|
|
||||||
|
# check that everything that's in LIBS_FROM_GIT was actually installed
|
||||||
|
# correctly, this helps double check issues with library fat fingering.
|
||||||
|
function check_libs_from_git {
|
||||||
|
local lib=""
|
||||||
|
local not_installed=""
|
||||||
|
for lib in $(echo ${LIBS_FROM_GIT} | tr "," " "); do
|
||||||
|
if ! lib_installed_from_git "$lib"; then
|
||||||
|
not_installed+=" $lib"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# if anything is not installed, say what it is.
|
||||||
|
if [[ -n "$not_installed" ]]; then
|
||||||
|
die $LINENO "The following LIBS_FROM_GIT were not installed correct: $not_installed"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# setup a library by name. If we are trying to use the library from
|
# setup a library by name. If we are trying to use the library from
|
||||||
# git, we'll do a git based install, otherwise we'll punt and the
|
# git, we'll do a git based install, otherwise we'll punt and the
|
||||||
# library should be installed by a requirements pull from another
|
# library should be installed by a requirements pull from another
|
||||||
|
7
stack.sh
7
stack.sh
@ -1373,9 +1373,16 @@ if [[ -x $TOP_DIR/local.sh ]]; then
|
|||||||
$TOP_DIR/local.sh
|
$TOP_DIR/local.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Sanity checks
|
||||||
|
# =============
|
||||||
|
|
||||||
# Check the status of running services
|
# Check the status of running services
|
||||||
service_check
|
service_check
|
||||||
|
|
||||||
|
# ensure that all the libraries we think we installed from git,
|
||||||
|
# actually were.
|
||||||
|
check_libs_from_git
|
||||||
|
|
||||||
|
|
||||||
# Bash completion
|
# Bash completion
|
||||||
# ===============
|
# ===============
|
||||||
|
Loading…
Reference in New Issue
Block a user