Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P2: Important
-
Resolution: Done
-
Affects Version/s: 5.10.1
-
Fix Version/s: 5.11.2
-
Component/s: Core: Other
-
Labels:None
-
Environment:All Linux
-
Platform/s:
-
Commits:58b6b723defd8006c08624d690e32d53db91cc89
Description
The QUnixOSVersion fallback list is wrong
Current list: /etc/os-release /etc/lsb-release /etc/redhat-release /etc/debian_version
Right list: /etc/os-release /usr/lib/os-release /etc/lsb-release /etc/redhat-release /etc/debian_version
"The file /etc/os-release takes precedence over /usr/lib/os-release. Applications should check for the former, and exclusively use its data if it exists, and only fall back to /usr/lib/os-release if it is missing. Applications should not read data from both files at the same time. /usr/lib/os-release is the recommended place to store OS release information as part of vendor trees. /etc/os-release should be a relative symlink to /usr/lib/os-release, to provide compatibility with applications only looking at /etc. A relative symlink instead of an absolute symlink is necessary to avoid breaking the link in a chroot or initrd environment such as dracut."
References: https://www.freedesktop.org/software/systemd/man/os-release.html