From: Andrew Schoen Date: Thu, 4 Aug 2016 18:30:47 +0000 (-0500) Subject: use mktemp when creating the venv directory X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=caeca594bf3be34fc36493d5f5ff7c7c2499d71a;p=ceph-build.git use mktemp when creating the venv directory Signed-off-by: Andrew Schoen --- diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index 4521c369..5f1a67aa 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -2,7 +2,8 @@ set -ex -VENV="/tmp/jenkins-venv/bin" +TEMPVENV=$(mktemp -td venv.XXXXXXXXXX) +VENV="$TEMPVENV/bin" install_python_packages () { # Use this function to create a virtualenv and install @@ -14,8 +15,7 @@ install_python_packages () { # install_python_packages "to_install[@]" # Create the virtualenv - rm -rf "/tmp/jenkins-venv" - virtualenv /tmp/jenkins-venv + virtualenv $TEMPVENV # Define and ensure the PIP cache PIP_SDIST_INDEX="$HOME/.cache/pip"