From 981ed299abe07b2b3e6d8df695a6b045804a5716 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Mon, 15 Dec 2014 21:11:20 -0800 Subject: [PATCH] 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 --- stack.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/stack.sh b/stack.sh index d97139aaa7..55a5a2dbd3 100755 --- a/stack.sh +++ b/stack.sh @@ -704,6 +704,19 @@ if [[ "$OFFLINE" != "True" ]]; then PYPI_ALTERNATIVE_URL=$PYPI_ALTERNATIVE_URL $TOP_DIR/tools/install_pip.sh 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 source $TOP_DIR/tools/fixup_stuff.sh @@ -729,19 +742,6 @@ if is_service_enabled neutron; then install_neutron_agent_packages 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 # ----------------------------