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.

Minor version missing for Debian >= 10

See original GitHub issue

For Debian >= 10 distro can’t get the minor version.

This worked for Debian <= 9 at least when you have the lsb-release Debian package installed with distro.version(best=True) because lsb_release -a returned the major and minor version in the Release key:

$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 9.12 (stretch)
Release:	9.12
Codename:	stretch

But with Debian >= 10 the Release key from lsb_release -a only has the major version:

$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 10 (buster)
Release:	10
Codename:	buster

For Debian >= 10 the only source for the minor version is file /etc/debian_version.

The /etc/debian_version file exists for years, even on older Debian versions, with a stable format (major.minor, with the exception that Debian <= 6 has major.minor.patch).

So maybe you can consider to parse /etc/debian_version to get the minor version.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
netsandboxcommented, Jun 21, 2022

@HorlogeSkynet Thank for your help and great support.

1reaction
HorlogeSkynetcommented, Jun 21, 2022

@netsandbox #339 has been merged, you will be able to fetch latest python2.7-support branch. Cheers 👋

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get minor version of debian-slim - linux - Stack Overflow
Is there a way to get the minor version? Does the container OS even know its full version number? linux · docker ·...
Read more >
The version number of my debian - Unix Stack Exchange
Debian does not include the minor version number in /etc/os-release , despite the clear indication in the manual that minor versions are ...
Read more >
solved - What's the command for a minor upgrade?
I've done it once before, upgrading my Debian v10.3 installation to v10.6 - but I failed to write down what worked, and now...
Read more >
Chapter 4. Upgrades from Debian 10 (buster)
Upgrade to Debian 10 (buster). Direct upgrades from Debian releases older than 10 (buster) are not supported. Display your Debian version with:
Read more >
6.4. Loading Missing Firmware - Debian
If a device driver requests firmware that is not available, debian-installer will display a dialog offering to load the missing firmware. If this...
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