Remove TRACK_DEPENDS
This was added in 2012 with I89677fd54635e82b10ab674ddeb9ffb3f1a755f0, but I can not see it being used anywhere currently. It's use of virtualenv's has become problematic in a python2 deprecated world, but since it is not used, remove it to avoid further confusion. Change-Id: I65d44d24f449436ca6229928eee2c5a021793055
This commit is contained in:
parent
4143ce6fc9
commit
bcb2c30c31
@ -27,7 +27,6 @@
|
||||
# - ``RECLONE``
|
||||
# - ``REQUIREMENTS_DIR``
|
||||
# - ``STACK_USER``
|
||||
# - ``TRACK_DEPENDS``
|
||||
# - ``http_proxy``, ``https_proxy``, ``no_proxy``
|
||||
#
|
||||
|
||||
@ -44,7 +43,6 @@ declare -A -g GITREPO
|
||||
declare -A -g GITBRANCH
|
||||
declare -A -g GITDIR
|
||||
|
||||
TRACK_DEPENDS=${TRACK_DEPENDS:-False}
|
||||
KILL_PATH="$(which kill)"
|
||||
|
||||
# Save these variables to .stackenv
|
||||
@ -2075,11 +2073,7 @@ function _safe_permission_operation {
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ $TRACK_DEPENDS = True ]]; then
|
||||
sudo_cmd="env"
|
||||
else
|
||||
sudo_cmd="sudo"
|
||||
fi
|
||||
|
||||
$xtrace
|
||||
$sudo_cmd $@
|
||||
|
11
inc/python
11
inc/python
@ -175,7 +175,7 @@ function disable_python3_package {
|
||||
|
||||
# Wrapper for ``pip install`` to set cache and proxy environment variables
|
||||
# Uses globals ``OFFLINE``, ``PIP_VIRTUAL_ENV``,
|
||||
# ``PIP_UPGRADE``, ``TRACK_DEPENDS``, ``*_proxy``,
|
||||
# ``PIP_UPGRADE``, ``*_proxy``,
|
||||
# Usage:
|
||||
# pip_install pip_arguments
|
||||
function pip_install {
|
||||
@ -219,14 +219,6 @@ function pip_install {
|
||||
# this works (for now...)
|
||||
local package_dir=${!#%\[*\]}
|
||||
|
||||
if [[ $TRACK_DEPENDS = True && ! "$@" =~ virtualenv ]]; then
|
||||
# TRACK_DEPENDS=True installation creates a circular dependency when
|
||||
# we attempt to install virtualenv into a virtualenv, so we must global
|
||||
# that installation.
|
||||
source $DEST/.venv/bin/activate
|
||||
local cmd_pip=$DEST/.venv/bin/pip
|
||||
local sudo_pip="env"
|
||||
else
|
||||
if [[ -n ${PIP_VIRTUAL_ENV:=} && -d ${PIP_VIRTUAL_ENV} ]]; then
|
||||
local cmd_pip=$PIP_VIRTUAL_ENV/bin/pip
|
||||
local sudo_pip="env"
|
||||
@ -252,7 +244,6 @@ function pip_install {
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
cmd_pip="$cmd_pip install"
|
||||
# Always apply constraints
|
||||
|
24
stack.sh
24
stack.sh
@ -796,19 +796,6 @@ 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
|
||||
fixup_all
|
||||
@ -997,17 +984,6 @@ fi
|
||||
# osc commands. Alias dies with stack.sh.
|
||||
install_oscwrap
|
||||
|
||||
if [[ $TRACK_DEPENDS = True ]]; then
|
||||
$DEST/.venv/bin/pip freeze > $DEST/requires-post-pip
|
||||
if ! diff -Nru $DEST/requires-pre-pip $DEST/requires-post-pip > $DEST/requires.diff; then
|
||||
echo "Detect some changes for installed packages of pip, in depend tracking mode"
|
||||
cat $DEST/requires.diff
|
||||
fi
|
||||
echo "Ran stack.sh in depend tracking mode, bailing out now"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
# Syslog
|
||||
# ------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user