From 1229a0879f44cfd96be208fee8c56ed68c669576 Mon Sep 17 00:00:00 2001 From: "Robbie Harwood (frozencemetery)" Date: Thu, 31 Jul 2014 13:55:06 -0400 Subject: [PATCH] Resolve circular dependency when tracking dependencies. When TRACK_DEPENDS=True, there is a circular dependency wherein virtualenv is used to install virtualenv before a virtualenv has been established. TRACK_DEPENDS does not work in any use case without this fix. Change-Id: I7a6652ba091cb95dac3871b6c71edcd762a7be62 Closes-Bug: 1208867 --- functions-common | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions-common b/functions-common index 2df5e1de10..13bc1cf558 100644 --- a/functions-common +++ b/functions-common @@ -1328,7 +1328,10 @@ function pip_install { 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 CMD_PIP=$DEST/.venv/bin/pip SUDO_PIP="env"