clean cloud images of python2
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | cloud-utils (Ubuntu) |
High
|
Unassigned | ||
| | Vivid |
High
|
Unassigned | ||
| | landscape-client (Ubuntu) |
High
|
Unassigned | ||
| | software-properties (Ubuntu) |
Undecided
|
Unassigned | ||
| | vim (Debian) |
Fix Released
|
Unknown
|
||
| | vim (Ubuntu) |
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-
python-debian python-gdbm python-idna python-openssl python-pam
python-
python-serial python-
python-
update-
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
ProcVersionSign
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
Ec2Availability
Ec2InstanceType: m1.small
Ec2Kernel: aki-00000002
Ec2Ramdisk: ari-00000002
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
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
- cloud-utils development: Pending requested 2015-03-05
-
Diff: 173 lines (+24/-26)3 files modifiedbin/ec2metadata (+13/-14)
bin/ubuntu-ec2-run (+4/-5)
bin/write-mime-multipart (+7/-7)
| Scott Moser (smoser) wrote : | #1 |
| Changed in cloud-utils (Ubuntu Vivid): | |
| importance: | Undecided → High |
| Changed in landscape-client (Ubuntu Vivid): | |
| importance: | Undecided → High |
| Changed in cloud-utils (Ubuntu Vivid): | |
| status: | New → Confirmed |
| Changed in landscape-client (Ubuntu Vivid): | |
| status: | New → Confirmed |
| Scott Moser (smoser) wrote : | #2 |
| Changed in vim (Ubuntu Vivid): | |
| status: | New → Confirmed |
| importance: | Undecided → High |
| Scott Moser (smoser) wrote : | #3 |
I ran this on a fresh cloud instance.
$ cat /etc/cloud/
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.
| no longer affects: | vim (Ubuntu Vivid) |
| no longer affects: | landscape-client (Ubuntu Vivid) |
| Scott Moser (smoser) wrote : | #4 |
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-
python-chardet python-configobj python-debian python-gdbm python-idna
python-openssl python-pam python-
python-
python-six python-twisted-bin python-twisted-core python-twisted-web
python-
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_name: server
serial: 20150413.1
| Changed in cloud-utils (Ubuntu Vivid): | |
| status: | Confirmed → Fix Released |
| Scott Moser (smoser) wrote : | #5 |
landscape-client removed from wily cloud-image seed.
| Changed in landscape-client (Ubuntu): | |
| status: | Confirmed → Fix Committed |
| Scott Moser (smoser) wrote : | #6 |
took an initial stab at vim, and then was pointed at https:/
which is debian bug to get python3 support.
just linking here.
| Scott Moser (smoser) wrote : | #7 |
marked software-properties as 'fix-released, as wily image has:
$ dpkg-query --show software-
software-
that depends on python3:any
| Changed in software-properties (Ubuntu): | |
| status: | New → Fix Released |
| Changed in vim (Debian): | |
| status: | Unknown → New |
| description: | updated |
| Barry Warsaw (barry) wrote : | #8 |
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`
| tags: | added: python3 |
| Matthias Klose (doko) wrote : | #9 |
vim is now built for python3. added some -py2 variants for those who need them.
| Changed in vim (Ubuntu): | |
| status: | Confirmed → Fix Released |
| Scott Moser (smoser) wrote : | #10 |
root@xenial-test:~# dpkg-query --show | libpy
libpy: command not found
root@xenial-test:~# dpkg-query --show | grep libpy
libpython3-
libpython3.
libpython3.
root@xenial-test:~# cat /etc/cloud/
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 |
| Scott Moser (smoser) wrote : | #11 |
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 |


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