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
diff --git a/stack.sh b/stack.sh
index d97139a..55a5a2d 100755
--- a/stack.sh
+++ b/stack.sh
@@ -704,6 +704,19 @@
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 @@
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
# ----------------------------