question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minimal information detected when lsb-release isn't installed

See original GitHub issue

Hi,

I hit this bug while using the distro module in a Debian Stretch docker container:

>>> distro._distroi.linux_distribution()
('Debian GNU/Linux', '', '')
>>> distro._distroi.info()
{'like': '', 'codename': '', 'id': 'debian', 'version': '', 'version_parts': {'build_number': '', 'major': '', 'minor': ''}}

Expected output:

>>> distro.linux_distribution()
('Debian GNU/Linux', 'testing', 'stretch')
>>> distro.info()
{'like': '', 'version': 'testing', 'codename': 'stretch', 'id': 'debian', 'version_parts': {'major': '', 'build_number': '', 'minor': ''}}

The /etc/os-release:

PRETTY_NAME="Debian GNU/Linux stretch/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Everything worked fine when I installed the lsb-release package, but I was under the impression that I wouldn’t need it in the first place.

HTH.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
asottilecommented, Dec 30, 2017

The information from when this ticket was created was when stretch was not yet a released version. Debian in this case chose to not fill out the release information. It is filed out now that it is released however \o/

0reactions
asottilecommented, Dec 31, 2017

I believe so, yes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Do some debian builds not have lsb_release? - Server Fault
One customer using Debian 6.0.5 indicated that the lsb_release command (even in the terminal) produces a command not found error.
Read more >
lsb_release: command not found in latest Ubuntu Docker ...
It seems lsb_release is not installed. you can install it via apt-get update && apt-get install -y lsb-release && apt-get clean all.
Read more >
linux - How can I reliably get the operating system's name?
As far as I know, there is no way of getting this information from uname so how can I get this on systems...
Read more >
How to fix lsb_release command not found in CentOS 8
This guide walks you through how to fix the lsb_release command not found error which usually deters you from checking the Linux version....
Read more >
[SOLVED]Cannot open package sources in mintupdate and ...
Version of base-files: '20.0.0'. Your LSB codename isn't a valid Linux Mint codename. Please check your LSB information with "lsb_release -a".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found