error with ec2-init pkg when running apt-get upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ec2-init (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Karmic |
Fix Released
|
Medium
|
Thierry Carrez |
Bug Description
Binary package hint: ec2-init
When I run the apt-get upgrade command on Ubuntu Karmic, I get this error:
$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
bind9-host dnsutils libbind9-50 libdns50 libisc50 libisccc50
libisccfg50 liblwres50 linux-ec2 linux-image-ec2 linux-image-virtual
linux-virtual
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]?
Setting up ec2-init (0.4.999-
Compiling /usr/lib/
File "/usr/lib/
class EC2Init():
^
SyntaxError: invalid syntax
pycentral: pycentral pkginstall: error byte-compiling files (2)
pycentral pkginstall: error byte-compiling files (2)
dpkg: error processing ec2-init (--configure):
subprocess installed post-installation script returned error exit
status 1
Errors were encountered while processing:
ec2-init
E: Sub-process /usr/bin/dpkg returned an error code (1)
ProblemType: Bug
Architecture: i386
Date: Thu Feb 11 23:15:10 2010
DistroRelease: Ubuntu 9.10
Ec2AMI: ami-1515f67c
Ec2AMIManifest: ubuntu-
Ec2Availability
Ec2InstanceType: m1.small
Ec2Kernel: aki-5f15f636
Ec2Ramdisk: ari-0915f660
Package: ec2-init 0.4.999-0ubuntu7.1
PackageArchitec
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: ec2-init
Tags: ec2-images
Uname: Linux 2.6.31-302-ec2 i686
=== Begin SRU Information ===
- impact on users: 'apt-get upgrade' fails if python2.4 is installed. This is because the installation attempts byte compile for all installed python versions, but some syntax is not 2.4 compatible.
- how the bug has been addressed: The EC2Init class had python 2.5+ syntax ['class EC2Init:()']. This was replaced with python2.4 compatible syntax by removing the '()'.
- patch is available at: http://
- regression pottential:
There was no other dependency on python2.5+, other than the syntax listed above. As such, with the fix, the byte compile succeeds. The code has been quickly tested to even run with python2.4, although this is not strictly necessary as /usr/bin/python will not be python2.4 in karmic.
TEST CASE:
- start ec2/uec instance (ami-1515f67c is current karmic us-east-1 GA -- 20091027.1.)
- sudo apt-get update && sudo apt-get install python2.4
- 'apt-get install ec2-init' will fail
=== End SRU Information ===
description: | updated |
description: | updated |
Changed in ec2-init (Ubuntu Karmic): | |
status: | Fix Committed → In Progress |
assignee: | Scott Moser (smoser) → Thierry Carrez (ttx) |
This is not an issue with cloud-init (which replaced ec2-init) in lucid.