Stop installing python2.7 on debian/focal

We still require py2 and the lxc library on the host for bionic as
the bionic CI image still has python2 at /usr/bin/python and ansible
interpreter discovery picks that when targetting localhost.

Change-Id: Ie94afc5a3c794b1c2be266b6642bc9c74b533287
This commit is contained in:
Jonathan Rosser 2020-05-28 09:05:02 +01:00
parent 7e25305c75
commit dfc9502e22
9 changed files with 6 additions and 15 deletions

View File

@ -21,14 +21,12 @@ apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--fo
apt-get upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes
apt-get remove -y --purge mariadb* || true
rm -f /usr/bin/python
rm -f /etc/apt/apt.conf.d/20listchanges
rm /etc/machine-id || true
rm /var/lib/dbus/machine-id || true
touch /etc/machine-id
rm /etc/sysctl.d/* || true
echo '' > /etc/sysctl.conf
ln -s /usr/bin/python2.7 /usr/bin/python
mkdir -p /root/.ssh
chmod 700 /root/.ssh
userdel --force --remove ubuntu || true

View File

@ -20,13 +20,11 @@ apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--fo
apt-get upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes
apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes {{ lxc_cache_distro_packages | join(' ') }}
apt-get upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes
rm -f /usr/bin/python
rm /etc/machine-id || true
rm /var/lib/dbus/machine-id || true
touch /etc/machine-id
rm /etc/sysctl.d/* || true
echo '' > /etc/sysctl.conf
ln -s /usr/bin/python2.7 /usr/bin/python
mkdir -p /root/.ssh
chmod 700 /root/.ssh
userdel --force --remove ubuntu || true

View File

@ -20,13 +20,11 @@ apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--fo
apt-get upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes
apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes {{ lxc_cache_distro_packages | join(' ') }}
apt-get upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes
rm -f /usr/bin/python
rm /etc/machine-id || true
rm /var/lib/dbus/machine-id || true
touch /etc/machine-id
rm /etc/sysctl.d/* || true
echo '' > /etc/sysctl.conf
ln -s /usr/bin/python2.7 /usr/bin/python
mkdir -p /root/.ssh
chmod 700 /root/.ssh
userdel --force --remove ubuntu || true

View File

@ -35,8 +35,7 @@ _lxc_hosts_distro_packages:
- lxc
- lxc-dev
- procps
- python-dev
- python-lxc
- python3-dev
- python3-lxc
- systemd-container
- xz-utils

View File

@ -46,8 +46,7 @@ _lxc_cache_distro_packages:
- openssh-server
- openssl
- procps
- python2.7
- python-dev
- python3-lxc
- python3-dev
- rsync
- sudo

View File

@ -38,9 +38,10 @@ _lxc_hosts_distro_packages:
- lxc-dev
- lxc-templates
- procps
- python-dev
- python-lxc
- python-dev # py2 is needed here becasue the CI image has py2 at /usr/bin/python
- python-lxc #
- python3-lxc
- python3-dev
- systemd-container
- xz-utils

View File

@ -45,8 +45,6 @@ _lxc_cache_distro_packages:
- netbase
- openssh-server
- openssl
- python2.7
- python-dev
- python3-dev
- rsync
- sudo

View File

@ -39,6 +39,7 @@ _lxc_hosts_distro_packages:
- lxc-templates
- procps
- python3-lxc
- python3-dev
- systemd-container
- xz-utils

View File

@ -45,7 +45,6 @@ _lxc_cache_distro_packages:
- netbase
- openssh-server
- openssl
- python2.7
- python3-dev
- rsync
- sudo