Drop special handling for RHEL < 8.4 in GetHostDistroName()

RHEL-8.3 is EOL and we do not explicitly support it. There is no need to
mangle the host distro name for RHEL-8 releases older than 8.4.
This commit is contained in:
Tomas Hozza 2022-08-24 10:38:36 +02:00 committed by Tom Gundersen
parent 1873c561cf
commit 2fba4c2c1f

View file

@ -23,12 +23,8 @@ func GetHostDistroName() (string, bool, bool, error) {
isStream := osrelease["NAME"] == "CentOS Stream"
// NOTE: We only consider major releases up until rhel 8.4
version := strings.Split(osrelease["VERSION_ID"], ".")
name := osrelease["ID"] + "-" + version[0]
if osrelease["ID"] == "rhel" && ((version[0] == "8" && version[1] >= "4") || version[0] == "9") {
name = name + version[1]
}
name := osrelease["ID"] + "-" + strings.Join(version, "")
// TODO: We should probably index these things by the full CPE
beta := strings.Contains(osrelease["CPE_NAME"], "beta")