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
| ... | ... |
@@ -1328,7 +1328,10 @@ function pip_install {
|
| 1328 | 1328 |
if [[ -z "$os_PACKAGE" ]]; then |
| 1329 | 1329 |
GetOSVersion |
| 1330 | 1330 |
fi |
| 1331 |
- if [[ $TRACK_DEPENDS = True ]]; then |
|
| 1331 |
+ if [[ $TRACK_DEPENDS = True && ! "$@" =~ virtualenv ]]; then |
|
| 1332 |
+ # TRACK_DEPENDS=True installation creates a circular dependency when |
|
| 1333 |
+ # we attempt to install virtualenv into a virualenv, so we must global |
|
| 1334 |
+ # that installation. |
|
| 1332 | 1335 |
source $DEST/.venv/bin/activate |
| 1333 | 1336 |
CMD_PIP=$DEST/.venv/bin/pip |
| 1334 | 1337 |
SUDO_PIP="env" |