Fix variable checks in install-deps

A couple of fixes:
- We check the content of the binary dir as debug step, but this
should be necessary only when in virtualenv.
Also using the correct virtualenv path instead of hardcoding it,
and removing - character after variable name.
- EXTRA_PKG_DEPS is an array and we should treat it like that
when we check if it's empty or not.

Change-Id: I294ef9dce53d7404f4d9285506f1504afabe833f
This commit is contained in:
Riccardo Pittau 2020-01-24 10:19:29 +01:00
parent ef9cf1abb9
commit c0d5c4ccb0
1 changed files with 5 additions and 3 deletions

View File

@ -121,7 +121,7 @@ for pkg in ${CHECK_CMD_PKGS[@]}; do
fi
done
if [ -n "${EXTRA_PKG_DEPS-}" ]; then
if [ "${#EXTRA_PKG_DEPS[@]}" -ne 0 ]; then
for pkg in ${EXTRA_PKG_DEPS[@]}; do
if ! $(${CHECK_CMD} ${pkg} &>/dev/null); then
${INSTALLER_CMD} ${pkg}
@ -129,7 +129,7 @@ if [ -n "${EXTRA_PKG_DEPS-}" ]; then
done
fi
if [ -n "${VENV-}" ]; then
if [ -n "${VENV}" ]; then
echo "NOTICE: Using virtualenv for this installation."
if [ ! -f ${VENV}/bin/activate ]; then
# only create venv if one doesn't exist
@ -162,7 +162,9 @@ if [ "$?" != "0" ]; then
sudo -H -E ${PYTHON} /tmp/get-pip.py
fi
ls -la /opt/stack/bifrost/bin
if [ -n "${VENV}" ]; then
ls -la ${VENV}/bin
fi
PIP=$(echo $PYTHON | sed 's/python/pip/')