Fix TRACKING_DEPENDS mode

TRACKING_DEPENDS mode was added in I89677fd54635e82b10ab674ddeb9ffb3f1a755f0

TRACKING_DEPENDS creates a global virtualenv and assumes it exists for
all pip_installs (except for installing virtualenv), so we need to set
this up before any other pip install

Change-Id: Iebe6295913094b32124295e7c5e674e1cebaaa87
This commit is contained in:
Joe Gordon 2014-12-15 21:11:20 -08:00
parent 7f80280698
commit 981ed299ab

View File

@ -704,6 +704,19 @@ if [[ "$OFFLINE" != "True" ]]; then
PYPI_ALTERNATIVE_URL=$PYPI_ALTERNATIVE_URL $TOP_DIR/tools/install_pip.sh PYPI_ALTERNATIVE_URL=$PYPI_ALTERNATIVE_URL $TOP_DIR/tools/install_pip.sh
fi fi
TRACK_DEPENDS=${TRACK_DEPENDS:-False}
# Install python packages into a virtualenv so that we can track them
if [[ $TRACK_DEPENDS = True ]]; then
echo_summary "Installing Python packages into a virtualenv $DEST/.venv"
pip_install -U virtualenv
rm -rf $DEST/.venv
virtualenv --system-site-packages $DEST/.venv
source $DEST/.venv/bin/activate
$DEST/.venv/bin/pip freeze > $DEST/requires-pre-pip
fi
# Do the ugly hacks for broken packages and distros # Do the ugly hacks for broken packages and distros
source $TOP_DIR/tools/fixup_stuff.sh source $TOP_DIR/tools/fixup_stuff.sh
@ -729,19 +742,6 @@ if is_service_enabled neutron; then
install_neutron_agent_packages install_neutron_agent_packages
fi fi
TRACK_DEPENDS=${TRACK_DEPENDS:-False}
# Install python packages into a virtualenv so that we can track them
if [[ $TRACK_DEPENDS = True ]]; then
echo_summary "Installing Python packages into a virtualenv $DEST/.venv"
pip_install -U virtualenv
rm -rf $DEST/.venv
virtualenv --system-site-packages $DEST/.venv
source $DEST/.venv/bin/activate
$DEST/.venv/bin/pip freeze > $DEST/requires-pre-pip
fi
# Check Out and Install Source # Check Out and Install Source
# ---------------------------- # ----------------------------