python2 cannot import lsb_release on yakkety and now xenial

Bug #1596638 reported by Curtis Hovey on 2016-06-27
This bug affects 10 people
Affects Status Importance Assigned to Milestone
lsb (Ubuntu)

Bug Description

[SRU Justification]
Targeted fix for a regression introduced in the previous SRU; the 'lsb_release' python module is now unavailable in python 2, where it was available before the SRU.

[Test Case]
1. Install lsb-release from xenial-updates.
2. Run "python -c 'import lsb_release'".
3. Verify that the command fails with an error.
4. Install lsb-release from xenial-proposed.
5. Run "python -c 'import lsb_release'".
6. Verify that the command succeeds (silently).

[Regression potential]
Minimal; this restores the python module to the state it was prior to the latest SRU. A debdiff of the binary packages should show no other changes.

python2 cannot import lsb_release on yakkety. `locate` shows "lsb-release" installed several files, but


is missing from disk. This was seen on an aws instance provisioned using the 20160526 daily image.

Curtis Hovey (sinzui) on 2016-07-01
summary: - python2 cannot import lsb_release on yakkety
+ python2 cannot import lsb_release on yakkety and now xenial
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lsb (Ubuntu):
status: New → Confirmed
Curtis Hovey (sinzui) wrote :

This issue is now seen in xenial. This was not a problem a few hours ago. We can see on xenial now. These versions

9.20160110ubuntu4 and 9.20160110ubuntu0.1 remove the py2 module, but do not provide a py2 package to install.

Robie Basak (racb) wrote :

Confirmed. This seems to be a regression in 9.20160110ubuntu0.1. I couldn't reproduce in a container that I'd already tested 9.20160110. Perhaps a compiled module got left behind on update? But it does affect new Xenial containers that have 9.20160110ubuntu0.1 installed fresh (not upgraded). This impacts server use cases where people deploy new cattle instead of upgrading pets.

tags: added: regression-update
Changed in lsb (Ubuntu):
importance: Undecided → Critical
status: Confirmed → Triaged
Changed in lsb (Ubuntu Xenial):
status: New → Triaged
importance: Undecided → Critical
Changed in lsb (Ubuntu):
importance: Critical → High
Aaron Bentley (abentley) wrote :

It also affects use cases where people upgrade existing machines. This happened to me sometime around July 1 to July 4 on my local machine.

Haw Loeung (hloeung) wrote :

Is there a fix in progress? Going around downgrading to 9.20160110 is a bit of a pain.

Paul Gear (paulgear) wrote :

Seen on a xenial daily image in Canonistack today.

Haw Loeung (hloeung) wrote :

An update leaves the .pyc around:

$ locate lsb_release

Haw Loeung (hloeung) wrote :

diff -Nru lsb-9.20160110/debian/lsb-release.install lsb-9.20160110ubuntu0.1/debian/lsb-release.install
--- lsb-9.20160110/debian/lsb-release.install 2014-08-28 23:04:48.000000000 +0000
+++ lsb-9.20160110ubuntu0.1/debian/lsb-release.install 2016-06-21 21:26:24.000000000 +0000
@@ -1,2 +1,2 @@
 lsb_release /usr/bin /usr/share/pyshared/ /usr/lib/python3/dist-packages/
diff -Nru lsb-9.20160110/debian/lsb-release.links lsb-9.20160110ubuntu0.1/debian/lsb-release.links
--- lsb-9.20160110/debian/lsb-release.links 2015-08-26 09:44:34.000000000 +0000
+++ lsb-9.20160110ubuntu0.1/debian/lsb-release.links 1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-usr/share/pyshared/ usr/lib/python2.7/dist-packages/
-usr/share/pyshared/ usr/lib/python3/dist-packages/

(also the dependency of python3)

Steve Langasek (vorlon) on 2016-07-06
description: updated

Hello Curtis, or anyone else affected,

Accepted lsb into xenial-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in lsb (Ubuntu Xenial):
status: Triaged → Fix Committed
tags: added: verification-needed
Haw Loeung (hloeung) wrote :

Fixed in 9.20160110ubuntu0.2.

Before update:

| hloeung@steelix:~$ python2.7
| ...
| >>> import lsb_release
| Traceback (most recent call last):
| File "<stdin>", line 1, in <module>
| ImportError: No module named lsb_release
| >>>


| hloeung@steelix:~$ ls /usr/lib/python*/dist-packages/lsb* -l
| lrwxrwxrwx 1 root root 38 Jul 6 16:29 /usr/lib/python2.7/dist-packages/ -> ../../../share/pyshared/
| lrwxrwxrwx 1 root root 38 Jul 6 16:29 /usr/lib/python3/dist-packages/ -> ../../../share/pyshared/

| hloeung@steelix:~$ python2.7
| >>> import lsb_release
| >>>

Thanks guys!

tags: added: verification-done
removed: verification-needed
Haw Loeung (hloeung) wrote :

And this if it helps:

| hloeung@steelix:~$ apt-cache policy lsb-release
| lsb-release:
| Installed: 9.20160110ubuntu0.2
| Candidate: 9.20160110ubuntu0.2
| Version table:
| *** 9.20160110ubuntu0.2 500
| 500 xenial-proposed/main amd64 Package
| 100 /var/lib/dpkg/status
| 9.20160110ubuntu0.1 500
| 500 xenial-updates/main amd64 Packages
| 9.20160110 500
| 500 xenial/main amd64 Packages

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lsb - 9.20160110ubuntu0.2

lsb (9.20160110ubuntu0.2) xenial; urgency=medium

  * Revert changes to python2 vs. python3 installation of,
    inadvertently breaking imports of lsb_release in python2. LP: #1596638.

 -- Steve Langasek <email address hidden> Wed, 06 Jul 2016 08:18:48 -0700

Changed in lsb (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for lsb has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lsb - 9.20160110ubuntu5

lsb (9.20160110ubuntu5) yakkety; urgency=medium

  * Revert changes to python2 vs. python3 installation of,
    inadvertently breaking imports of lsb_release in python2. LP: #1596638.

 -- Steve Langasek <email address hidden> Wed, 06 Jul 2016 08:20:18 -0700

Changed in lsb (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers