[Bug 1253208] Re: python-distro-info hard to use for some cases

Benjamin Drung bdrung at posteo.de
Thu Jul 20 12:06:42 UTC 2017


I implemented a DistroRelease class. Example call:

distros = distro_info.UbuntuDistroInfo().get_all(result="object")

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

Title:
  python-distro-info hard to use for some cases

Status in distro-info package in Ubuntu:
  Confirmed

Bug description:
  Getting information out of distro_info for some common things such as getting fullname or version for a known codename is very difficult.
  There is no easy way to get a full list of all the data to filter through.

  I've written a 'get_ubuntu_info' method at https://gist.github.com/smoser/6784120#file-distro_info_dict
  that gives me a list of dicts with info for each release for a given date.  I called it 'get_ubuntu_info', but it works for debian.

  It results in a list of dicts like:
   [{'codename': 'trusty', 'devel': True,
    'full_codename': 'Trusty Tahr', 'fullname': 'Ubuntu 14.04 LTS "Trusty Tahr"',
    'lts': True, 'supported': True, 'version': '14.04'}]

  
  Perhaps we could add a helper like this in the library?

  It also seems there is a smll bug in output formatting if a release does not have a version (Sid and Experimental):
    >>> distro_info.DebianDistroInfo().supported(result="fullname")
    >>> ['Debian 6.0 "Squeeze"',  'Debian 7.0 "Wheezy"',  'Debian 8.0 "Jessie"',  'Debian  "Sid"',  'Debian  "Experimental"']

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: distro-info 0.8.2
  ProcVersionSignature: User Name 3.2.0-56.86-virtual 3.2.51
  Uname: Linux 3.2.0-56-virtual x86_64
  ApportVersion: 2.0.1-0ubuntu17.6
  Architecture: amd64
  Date: Wed Nov 20 17:12:42 2013
  Ec2AMI: ami-000005ec
  Ec2AMIManifest: FIXME
  Ec2AvailabilityZone: nova
  Ec2InstanceType: m1.tiny
  Ec2Kernel: aki-00000548
  Ec2Ramdisk: ari-00000548
  MarkForUpload: True
  ProcEnviron:
   TERM=screen
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: distro-info
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/distro-info/+bug/1253208/+subscriptions



More information about the foundations-bugs mailing list