From 1d88a2aac915ed6af3e8029d842bbf3f075eaf56 Mon Sep 17 00:00:00 2001 From: leiziwei Date: Wed, 8 Nov 2023 14:29:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9gs=5Fcheck=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E4=B8=8D=E6=98=AFuos=E7=9A=84=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/gspylib/os/gsplatform.py | 2 +- script/local/LocalCheckOS.py | 6 +----- script/os_platform/linux_platform.py | 4 ++-- script/os_platform/rhel_platform.py | 11 +++++++---- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/script/gspylib/os/gsplatform.py b/script/gspylib/os/gsplatform.py index 6b07039..51e93af 100644 --- a/script/gspylib/os/gsplatform.py +++ b/script/gspylib/os/gsplatform.py @@ -1736,7 +1736,7 @@ class LinuxPlatform(GenericPlatform): prefixStr, packageVersion, PAK_KYLIN, BIT_VERSION, postfixStr)) - elif distname in UOS or distname in UNIONTECH: + elif distname in UOS: fileName = os.path.join(dirName, "./../../../", "%s-%s-%s-%s.%s" % ( prefixStr, packageVersion, diff --git a/script/local/LocalCheckOS.py b/script/local/LocalCheckOS.py index 147c004..7be9628 100644 --- a/script/local/LocalCheckOS.py +++ b/script/local/LocalCheckOS.py @@ -1908,11 +1908,7 @@ def CheckPlatformInfo(): data.bits) g_logger.log("False %s %s" % (data.distname, platform_str)) return - elif (data.distname == "euleros" or data.distname == "openEuler" or data.distname == "FusionOS" or data.distname == "kylin"): - mixed_type = "%s" % data.distname - platform_str = "%s_%s_%s" % (data.distname, data.version, data.bits) - elif (data.distname == "uos" or data.distname == "uniontech"): - data.distname = "uos" + elif (data.distname == "euleros" or data.distname == "openEuler" or data.distname == "FusionOS" or data.distname == "kylin" or data.distname == "uos"): mixed_type = "%s" % data.distname platform_str = "%s_%s_%s" % (data.distname, data.version, data.bits) elif (data.distname == "debian" or data.version == "buster/sid"): diff --git a/script/os_platform/linux_platform.py b/script/os_platform/linux_platform.py index 2d4e1bf..b4ac31d 100644 --- a/script/os_platform/linux_platform.py +++ b/script/os_platform/linux_platform.py @@ -23,7 +23,7 @@ import os from gspylib.common.ErrorCode import ErrorCode from os_platform.common import REDHAT, PAK_REDHAT, BIT_VERSION, \ - CENTOS, UOS, UNIONTECH, PAK_EULER, PAK_CENTOS, ASIANUX, SUSE, PAK_ASIANUX, \ + CENTOS, UOS, PAK_EULER, PAK_CENTOS, ASIANUX, SUSE, PAK_ASIANUX, \ EULEROS, OPENEULER, KYLIN, PAK_OPENEULER, SUPPORT_WHOLE_PLATFORM_LIST,\ BLANK_SPACE, PAK_UBUNTU, DEBIAN, PAK_KYLIN, PAK_UOS, PAK_SUSE, PAK_DEBIAN, \ FUSIONOS, PAK_FUSIONOS @@ -213,7 +213,7 @@ class LinuxPlatform(object): self.package_file_path(prefix_str, packageVersion, PAK_CENTOS, postfix_str) ] - elif distname == OPENEULER or distname == KYLIN or distname == UOS or distname == UNIONTECH: + elif distname == OPENEULER or distname == KYLIN or distname == UOS: file_name_list = [ self.package_file_path(prefix_str, packageVersion, PAK_OPENEULER, postfix_str), self.package_file_path(prefix_str, packageVersion, PAK_KYLIN, postfix_str), diff --git a/script/os_platform/rhel_platform.py b/script/os_platform/rhel_platform.py index 9b84d81..88ccbe4 100644 --- a/script/os_platform/rhel_platform.py +++ b/script/os_platform/rhel_platform.py @@ -168,10 +168,6 @@ class RHELPlatform(LinuxPlatform): if ((bits == BIT_VERSION and ((dist_name.lower() == EULEROS and version[0:3] in SUPPORT_EULEROS_VERSION_LIST) or - (dist_name.lower() == UOS and version[0:3] in - SUPPORT_UOS_VERSION_LIST) or - (dist_name.lower() == UNIONTECH and version[0:3] in - SUPPORT_UOS_VERSION_LIST) or (dist_name.lower() in SUPPORT_RHEL_SERIES_PLATFORM_LIST and version[0:3] in SUPPORT_RHEL_SERIES_VERSION_LIST)) or (dist_name.lower() == OPENEULER) or @@ -179,6 +175,13 @@ class RHELPlatform(LinuxPlatform): (dist_name.lower() == DEBIAN and version == "buster/sid") )): return dist_name.lower(), version[0:3] + elif((bits == BIT_VERSION and + ((dist_name.lower() == UOS and version[0:3] in + SUPPORT_UOS_VERSION_LIST) or + (dist_name.lower() == UNIONTECH and version[0:3] in + SUPPORT_UOS_VERSION_LIST)) + )): + return UOS, version[0:3] else: if dist_name.lower() == CENTOS and os.path.isfile( os.path.join("/etc", "euleros-release")) and \