From d369bbb7e416b473b688a6d31a10fd81102fbfc7 Mon Sep 17 00:00:00 2001 From: leiziwei Date: Wed, 8 Nov 2023 13:49:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B1=E4=BA=8Euos=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=9C=89=E4=B8=A4=E7=A7=8Drelease=E6=96=87=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E6=89=80=E4=BB=A5OM=E8=A6=81=E6=94=AF=E6=8C=81=E8=BF=99?= =?UTF-8?q?=E4=B8=A4=E7=A7=8D=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/gspylib/os/gsplatform.py | 9 +++++---- script/local/LocalCheckOS.py | 6 +++++- script/os_platform/common.py | 9 +++++---- script/os_platform/linux_platform.py | 4 ++-- script/os_platform/rhel_platform.py | 4 +++- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/script/gspylib/os/gsplatform.py b/script/gspylib/os/gsplatform.py index 6084723..6b07039 100644 --- a/script/gspylib/os/gsplatform.py +++ b/script/gspylib/os/gsplatform.py @@ -72,9 +72,10 @@ OPENEULER = "openeuler" ASIANUX = "asianux" DEBIAN = "debian" UBUNTU = "ubuntu" +UNIONTECH = "uniontech" UOS = "uos" SUPPORT_WHOLE_PLATFORM_LIST = [SUSE, REDHAT, CENTOS, EULEROS, FUSIONOS, - OPENEULER, KYLIN, ASIANUX, DEBIAN, UBUNTU, UOS] + OPENEULER, KYLIN, ASIANUX, DEBIAN, UBUNTU, UOS, UNIONTECH] # RedhatX platform SUPPORT_RHEL_SERIES_PLATFORM_LIST = [REDHAT, CENTOS, "kylin", "asianux"] SUPPORT_RHEL6X_VERSION_LIST = ["6.4", "6.5", "6.6", "6.7", "6.8", "6.9", "10"] @@ -114,9 +115,9 @@ PAK_KYLIN = "Kylin" PAK_UOS = "uos" ####################################################### _supported_dists = ( - 'SuSE', 'debian', 'fedora', 'redhat', 'centos', 'euleros', "openEuler", + 'SuSE', 'debian', 'fedora', 'redhat', 'centos', 'euleros', 'openEuler', 'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo', - 'FusionOS', 'UnitedLinux', 'turbolinux', 'kylin', 'asianux', 'ubuntu', 'uos') + 'FusionOS', 'UnitedLinux', 'turbolinux', 'kylin', 'asianux', 'ubuntu', 'uos', 'UnionTech') _release_filename = re.compile(r'(\w+)[-_](release|version)') _lsb_release_version = re.compile(r'(.+)' ' release ' @@ -1735,7 +1736,7 @@ class LinuxPlatform(GenericPlatform): prefixStr, packageVersion, PAK_KYLIN, BIT_VERSION, postfixStr)) - elif distname in UOS: + elif distname in UOS or distname in UNIONTECH: 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 7be9628..147c004 100644 --- a/script/local/LocalCheckOS.py +++ b/script/local/LocalCheckOS.py @@ -1908,7 +1908,11 @@ 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" or data.distname == "uos"): + 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" 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/common.py b/script/os_platform/common.py index c917dad..a59210b 100644 --- a/script/os_platform/common.py +++ b/script/os_platform/common.py @@ -31,9 +31,10 @@ FUSIONOS = "fusionos" ASIANUX = "asianux" DEBIAN = "debian" UBUNTU = "ubuntu" +UNIONTECH = "uniontech" UOS = "uos" SUPPORT_WHOLE_PLATFORM_LIST = [SUSE, REDHAT, CENTOS, EULEROS, OPENEULER, KYLIN, - FUSIONOS, ASIANUX, DEBIAN, UBUNTU, UOS] + FUSIONOS, ASIANUX, DEBIAN, UBUNTU, UOS, UNIONTECH] # RedhatX platform SUPPORT_RHEL_SERIES_PLATFORM_LIST = [REDHAT, CENTOS, "kylin", "asianux"] SUPPORT_RHEL6X_VERSION_LIST = ["6.4", "6.5", "6.6", "6.7", "6.8", "6.9", "10"] @@ -46,7 +47,7 @@ SUPPORT_RHEL_SERIES_VERSION_LIST = (SUPPORT_RHEL6X_VERSION_LIST + SUPPORT_RHEL8X_VERSION_LIST) # EulerOS 2.3 -> 2.0 SP3 SUPPORT_EULEROS_VERSION_LIST = ["2.0"] -# Uos 20 +# UOS 20 SUPPORT_UOS_VERSION_LIST = ["20"] # SuSE platform SUSE11 = "11" @@ -75,6 +76,6 @@ PAK_DEBIAN = "Debian" PAK_UOS = "uos" ####################################################### _supported_dists = ( - 'SuSE', 'debian', 'fedora', 'redhat', 'centos', 'euleros', "openEuler", + 'SuSE', 'debian', 'fedora', 'redhat', 'centos', 'euleros', 'openEuler', 'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo', - "FusionOS", 'UnitedLinux', 'turbolinux', 'ubuntu', 'kylin', 'asianux', "uos") + 'FusionOS', 'UnitedLinux', 'turbolinux', 'ubuntu', 'kylin', 'asianux', 'uos', 'UnionTech') diff --git a/script/os_platform/linux_platform.py b/script/os_platform/linux_platform.py index b4ac31d..2d4e1bf 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, PAK_EULER, PAK_CENTOS, ASIANUX, SUSE, PAK_ASIANUX, \ + CENTOS, UOS, UNIONTECH, 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: + elif distname == OPENEULER or distname == KYLIN or distname == UOS or distname == UNIONTECH: 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 a1c9b38..9b84d81 100644 --- a/script/os_platform/rhel_platform.py +++ b/script/os_platform/rhel_platform.py @@ -26,7 +26,7 @@ from gspylib.common.ErrorCode import ErrorCode from os_platform.common import BIT_VERSION, EULEROS, SUPPORT_EULEROS_VERSION_LIST, \ FUSIONOS, SUPPORT_RHEL_SERIES_PLATFORM_LIST, \ SUPPORT_RHEL_SERIES_VERSION_LIST, OPENEULER, CENTOS, \ - UOS, SUPPORT_UOS_VERSION_LIST, \ + UOS, UNIONTECH, SUPPORT_UOS_VERSION_LIST, \ SUPPORT_RHEL7X_VERSION_LIST, DEBIAN, BLANK_SPACE from os_platform.linux_distro import LinuxDistro from os_platform.linux_platform import LinuxPlatform @@ -170,6 +170,8 @@ class RHELPlatform(LinuxPlatform): 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