From 91d94945ca8d38af61970447f82545e3f6ceb375 Mon Sep 17 00:00:00 2001 From: Xueyi Luo Date: Thu, 5 May 2022 17:04:10 +0800 Subject: [PATCH] =?UTF-8?q?kylin-system-version.conf=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/SystemUpdater/Core/Database.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/SystemUpdater/Core/Database.py b/backend/SystemUpdater/Core/Database.py index a3ba43f..0675795 100644 --- a/backend/SystemUpdater/Core/Database.py +++ b/backend/SystemUpdater/Core/Database.py @@ -431,11 +431,17 @@ class Sqlite3Server(object): except Exception as e: logging.error(str(e)) - def _refresh_system_version(self, version=''): + def _refresh_system_version(self, version='', release_id = ''): try: - #刷新系统版本号:version version = version.strip() + release_id = release_id.strip() + + #刷新系统版本号:version self.ucconfigs.setValue("SYSTEM","version",str(version),True) + version_path = "/etc/kylin-version/kylin-system-version.conf" + if os.path.isfile(version_path): + cnf = UpgradeConfig(datadir = "/etc/kylin-version", name = "kylin-system-version.conf") + cnf.setValue("SYSTEM","version",str(version),True) version = "" #初始化系统版本号:kylin_release_id version_path = "/etc/os-release"