clean cloud images of python2

Bug #1427275 reported by Scott Moser
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-utils (Ubuntu)
Fix Released
High
Unassigned
Vivid
Fix Released
High
Unassigned
landscape-client (Ubuntu)
Fix Released
High
Unassigned
software-properties (Ubuntu)
Fix Released
Undecided
Unassigned
vim (Debian)
Fix Released
Unknown
vim (Ubuntu)
Fix Released
High
Unassigned

Bug Description

cloud-init is now running in python3 in the cloud images in vivid.
We'd like to remove the remaining few python2 packages.
P

From a 20150228 image, that looks like:
$ sudo apt-get remove python
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  cloud-guest-utils cloud-init landscape-client landscape-common python
  python-apt python-characteristic python-chardet python-configobj
  python-debian python-gdbm python-idna python-openssl python-pam
  python-pkg-resources python-pyasn1 python-pyasn1-modules python-pycurl
  python-serial python-service-identity python-six python-twisted-bin
  python-twisted-core python-twisted-web python-zope.interface
  update-notifier-common
0 upgraded, 0 newly installed, 26 to remove and 17 not upgraded.
After this operation, 18.1 MB disk space will be freed.
Do you want to continue? [Y/n]

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: landscape-client 14.12-0ubuntu1
ProcVersionSignature: User Name 3.18.0-13.14-generic 3.18.5
Uname: Linux 3.18.0-13-generic x86_64
ApportVersion: 2.16.1-0ubuntu2
Architecture: amd64
Date: Mon Mar 2 15:56:05 2015
Ec2AMI: ami-000001cc
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: aki-00000002
Ec2Ramdisk: ari-00000002
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: landscape-client
UpgradeStatus: No upgrade log present (probably fresh install)

Related bugs:
 * Bug 1497030: [FFE] Cloud Images include landscape-client (Python2.7)

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Changed in cloud-utils (Ubuntu Vivid):
importance: Undecided → High
Changed in landscape-client (Ubuntu Vivid):
importance: Undecided → High
Scott Moser (smoser)
Changed in cloud-utils (Ubuntu Vivid):
status: New → Confirmed
Changed in landscape-client (Ubuntu Vivid):
status: New → Confirmed
Revision history for this message
Scott Moser (smoser) wrote :

this should be fixed in latest upload of cloud-utils (0.27-0ubuntu13)

Scott Moser (smoser)
Changed in vim (Ubuntu Vivid):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Scott Moser (smoser) wrote :

I ran this on a fresh cloud instance.
$ cat /etc/cloud/build.info
build_name: server
serial: 20150403.2

$ py2pkgs=$(dpkg -l | grep python | grep -v python3 | awk '{print $2}')
$ for p in $py2pkgs; do
  out=$(sudo apt-get remove --dry-run $p 2>&1); pkgs=$(echo "$out" | awk '$1 == "Remv" && $2 != p { print $2 }' p="$p");
   echo ${p%:*}: $pkgs; done

The things I'm confused about are:
python-idna:
python-pam:
python-serial:

I suspect these are recommends pulling those in.

Scott Moser (smoser)
no longer affects: vim (Ubuntu Vivid)
no longer affects: landscape-client (Ubuntu Vivid)
Revision history for this message
Scott Moser (smoser) wrote :

point of reference:
$ sudo apt-get remove python
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  landscape-client landscape-common python python-apt python-characteristic
  python-chardet python-configobj python-debian python-gdbm python-idna
  python-openssl python-pam python-pkg-resources python-pyasn1
  python-pyasn1-modules python-pycurl python-serial python-service-identity
  python-six python-twisted-bin python-twisted-core python-twisted-web
  python-zope.interface update-notifier-common
0 upgraded, 0 newly installed, 24 to remove and 0 not upgraded.
After this operation, 17.0 MB disk space will be freed.
Do you want to continue? [Y/n] n

$ cat /etc/cloud/build.info
build_name: server
serial: 20150413.1

Scott Moser (smoser)
Changed in cloud-utils (Ubuntu Vivid):
status: Confirmed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote :

landscape-client removed from wily cloud-image seed.

Changed in landscape-client (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote :

took an initial stab at vim, and then was pointed at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=729924
which is debian bug to get python3 support.
just linking here.

Revision history for this message
Scott Moser (smoser) wrote :

marked software-properties as 'fix-released, as wily image has:
$ dpkg-query --show software-properties-common
software-properties-common 0.96.10

that depends on python3:any

Changed in software-properties (Ubuntu):
status: New → Fix Released
Changed in vim (Debian):
status: Unknown → New
Scott Moser (smoser)
description: updated
Revision history for this message
Barry Warsaw (barry) wrote :

Just tested with Xenial server, with no additional packages installed. vim is the last thing keeping libpython2.7 on the server image. Verify with `apt-get purge python2.7 libpython2.7`

Barry Warsaw (barry)
tags: added: python3
Revision history for this message
Matthias Klose (doko) wrote :

vim is now built for python3. added some -py2 variants for those who need them.

Changed in vim (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote :

root@xenial-test:~# dpkg-query --show | libpy
libpy: command not found
root@xenial-test:~# dpkg-query --show | grep libpy
libpython3-stdlib:amd64 3.5.1-1ubuntu2
libpython3.5-minimal:amd64 3.5.1-6ubuntu1
libpython3.5-stdlib:amd64 3.5.1-6ubuntu1
root@xenial-test:~# cat /etc/cloud/build.info
build_name: server
serial: 20160223-165330

Horay. This appears fix-released. no python2 in cloud image.

Changed in landscape-client (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote :

marked landscape-client as fix-released as it is no longer in the server seed. or cloud-image seed.

Changed in vim (Debian):
status: New → Fix Committed
Changed in vim (Debian):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.