[Bug 1650207] Re: original lsb-release file should be preserved for classic mode

Kyle Fazzari kyle at canonical.com
Thu Jan 26 00:13:37 UTC 2017


Yeah, hit this today:

$ python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lsb_release
>>> lsb_release.get_distro_information()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 383, in get_distro_information
    distinfo = guess_debian_release()
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 281, in guess_debian_release
    get_distro_info(distinfo['ID'])
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 41, in get_distro_info
    RELEASES_ORDER.sort(key=lambda n: float(n[0]))
  File "/usr/lib/python3/dist-packages/lsb_release.py", line 41, in <lambda>
    RELEASES_ORDER.sort(key=lambda n: float(n[0]))
ValueError: could not convert string to float: '8.04 LTS'

Although that's just due to the fact that it's missing the
DISTRIB_CODENAME. Add that back and I think I'll be happy.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to livecd-rootfs in Ubuntu.
https://bugs.launchpad.net/bugs/1650207

Title:
  original lsb-release file should be preserved for classic mode

Status in Snappy:
  New
Status in livecd-rootfs package in Ubuntu:
  Confirmed

Bug description:
  when installing the classic snap the modified /etc/lsb-release and
  /etc/os-release are used inside the tarball. when compiling code that
  uses the content of these files at build time they get the wrong info:

  DISTRIB_ID="Ubuntu Core"
  DISTRIB_RELEASE=16
  DISTRIB_DESCRIPTION="Ubuntu Core 16"

  vs:

  DISTRIB_ID=Ubuntu
  DISTRIB_RELEASE=16.04
  DISTRIB_CODENAME=xenial
  DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"

  we should preserve the original data for these two files and use it
  inside the classic container when the classic snap is installed, so
  build environments can match against the correct data.

To manage notifications about this bug go to:
https://bugs.launchpad.net/snappy/+bug/1650207/+subscriptions



More information about the foundations-bugs mailing list