Merge "Resolve circular dependency when tracking dependencies."
diff --git a/functions-common b/functions-common
index 8d5197d..5284056 100644
--- a/functions-common
+++ b/functions-common
@@ -1349,7 +1349,10 @@
     if [[ -z "$os_PACKAGE" ]]; then
         GetOSVersion
     fi
-    if [[ $TRACK_DEPENDS = True ]]; then
+    if [[ $TRACK_DEPENDS = True && ! "$@" =~ virtualenv ]]; then
+        # TRACK_DEPENDS=True installation creates a circular dependency when
+        # we attempt to install virtualenv into a virualenv, so we must global
+        # that installation.
         source $DEST/.venv/bin/activate
         local cmd_pip=$DEST/.venv/bin/pip
         local sudo_pip="env"