[Bug 1619420] Re: snappy removal of dpkg-query breaks lsb_release --all

Robert Liu 1619420 at bugs.launchpad.net
Tue Feb 21 02:03:12 UTC 2017


Hi @Ogra,

I cannot get the correct result on a all-snap system. Is this expected?

admin at caracalla:~$ lsb_release 
Traceback (most recent call last):
  File "/usr/bin/lsb_release", line 95, in <module>
    main()
  File "/usr/bin/lsb_release", line 59, in main
    distinfo = lsb_release.get_distro_information()
  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'
admin at caracalla:~$ snap info core
name:      core
summary:   "snapd runtime environment"
publisher: canonical
description: |
  The core runtime environment for snapd
type:        core
tracking:    edge
installed:   16.04.1 (1251) 79MB -
refreshed:   2017-02-20 16:05:56 +0000 UTC
channels:                   
  stable:    16.04.1 (1240) 79MB -
  candidate: 16.04.1 (1240) 79MB -
  beta:      16.04.1 (1240) 79MB -
  edge:      16.04.1 (1251) 79MB -
admin at caracalla:~$ cat /etc/os-release 
NAME="Ubuntu Core"
VERSION="16"
ID=ubuntu-core
PRETTY_NAME="Ubuntu Core 16"
VERSION_ID="16"
HOME_URL="http://www.snapcraft.io/"
BUG_REPORT_URL="http://bugs.launchpad.net/snappy/"
admin at caracalla:~$ cat /etc/issue
Ubuntu Core 16 on \4 (\l)

-- 
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/1619420

Title:
  snappy removal of dpkg-query breaks lsb_release --all

Status in cloud-init:
  New
Status in Snappy:
  Fix Committed
Status in livecd-rootfs package in Ubuntu:
  Fix Committed

Bug description:
  root at localhost:~# lsb_release --all
  Traceback (most recent call last):
    File "/usr/bin/lsb_release", line 95, in <module>
      main()
    File "/usr/bin/lsb_release", line 62, in main
      verinfo = lsb_release.check_modules_installed()
    File "/usr/lib/python3/dist-packages/lsb_release.py", line 136, in check_modules_installed
      close_fds=True).communicate()[0].decode('utf-8')
    File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
      restore_signals, start_new_session)
    File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
      raise child_exception_type(errno_num, err_msg)
  FileNotFoundError: [Errno 2] No such file or directory: 'dpkg-query'

  cloud-init collects distro information via lsb_release --all

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1619420/+subscriptions



More information about the foundations-bugs mailing list