Revert Xenial to Python 2

There are issues with pip packages and a python3 only Xenial systems.
This is occuring after Ie609de51cc5fcde701296c9474e315981d9778a2.

We believe the issue is with VIRTUAL_ENV being set within the chroot
and messing up pip installs
(Icdb769541eee9793f261b4b8ec563be76ee13fe2) but a full solution is not
yet clear.

For now, set Xenial to ensure we use python2.  Install the package for
the ubuntu element (75-debian-minimal-baseinstall will install python2
for the minimal elements).

Change-Id: Id403919b0af93b375a900186c01a0d3a3bdfafea
This commit is contained in:
Ian Wienand 2016-12-21 05:11:07 +00:00
parent e32688e71e
commit 2978ff885b
2 changed files with 12 additions and 0 deletions

View File

@ -5,6 +5,8 @@ if [ -z "${DIB_PYTHON_VERSION:-}" ]; then
DIB_PYTHON_VERSION=2
elif [ "$DIB_RELEASE" == "trusty" ]; then
DIB_PYTHON_VERSION=2
elif [ "$DIB_RELEASE" == "xenial" ]; then
DIB_PYTHON_VERSION=2
fi
elif [ "$DISTRO_NAME" == "debian" ]; then
DIB_PYTHON_VERSION=2

View File

@ -0,0 +1,10 @@
#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# hack to get python into Xenial python3 only images, while we
# work-around issues.
apt-get -y install python || true