Describe the enhancement
tool-cache._getOsVersion() had been using /etc/lsb-release to detect Linux OS versions, but recently, it was improved to use /etc/os-release from systemd : #594
But it used VERSION_ID only, and it does not process Linux distro information.
- Here are contents of
/etc/os-release from various Linux Distros.
- RHEL and its compatible distros have compatible ABI if they have same major version, but their
VERSION_ID are different.
- CentOS : 8
- RockyLinux : 8.7
IMHO, the purpose of tool-cache._getOsVersion() is to distinguish the ABI of the OS.
So, I propose to improve it as follows.
Code Snippet
If applicable, add a code snippet to show the api enhancement.
Additional information
Add any other context about the feature here.
Describe the enhancement
tool-cache._getOsVersion()had been using/etc/lsb-releaseto detect Linux OS versions, but recently, it was improved to use/etc/os-releasefrom systemd : #594But it used
VERSION_IDonly, and it does not process Linux distro information./etc/os-releasefrom various Linux Distros.VERSION_IDare different.IMHO, the purpose of
tool-cache._getOsVersion()is to distinguish the ABI of the OS.So, I propose to improve it as follows.
Return
PLATFORM_IDfirst if it is available from/etc/os-releasePLATFORM_IDwhich OS is compatible.PLATFORM_ID=platform:el8Return old behavior (
VERSION_IDfrom /etc/os-release) ifPLATFORM_IDis not available.Code Snippet
If applicable, add a code snippet to show the api enhancement.
Additional information
Add any other context about the feature here.