From 00d7c619e9755a0538db393dc1afd4702becb748 Mon Sep 17 00:00:00 2001 From: Gregory Haynes Date: Wed, 18 Oct 2017 12:24:30 -0700 Subject: [PATCH] Dont install python-virtualenv for py3k in deb On ubuntu we detect that in python3 we need to install python3-virtualenv, but append this to the packages to install rather than replace python-virtualenv which results in both being installed (and therefore grabbing python2). Change-Id: I422490ebe9a9c655552685bc2ff342d288335a9c Closes-Bug: #1724656 --- .../install.d/pip-and-virtualenv-source-install/04-install-pip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip b/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip index b969240d8..3e8638310 100755 --- a/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip +++ b/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip @@ -112,7 +112,7 @@ else # time and you had to use "python -m venv". Since then virtualenv # has gained 3.4 support so the pip install below will work if [[ ${DIB_PYTHON_VERSION} == 3 ]]; then - packages+=" python3-virtualenv" + packages=$(echo "$packages" | sed s/python-virtualenv/python3-virtualenv/) fi apt-get -y install $packages