Minor version missing for Debian >= 10
See original GitHub issueFor 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:
- Created a year ago
- Comments:7 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@HorlogeSkynet Thank for your help and great support.
@netsandbox #339 has been merged, you will be able to fetch latest
python2.7-support
branch. Cheers 👋