Merge branch 'backend_manual' of gitlab2.kylin.com:kylin-desktop/update-manager-group/kylin-system-updater into backend_manual

This commit is contained in:
wangsong 2022-08-18 15:39:36 +08:00
commit 283183925c
4 changed files with 24 additions and 8 deletions

View File

@ -185,6 +185,7 @@ class Sqlite3Server(object):
status = 'failed'
status_cn = '失败'
changeLog = ""
# 判断更新方式
if mode == InstallBackend.MODE_INSTALL_PARTIAL: # 部分更新
pkg_adj = ""
@ -213,8 +214,9 @@ class Sqlite3Server(object):
if status == "success" and "kylin-update-desktop-system" in pkgname:
# 更新版本号
if "=" in str(pkgversion):
version = str(pkgversion).split('=')[-1]
self._refresh_system_version(version)
pkgversion = str(pkgversion).split('=')[-1]
logging.info("Complete system upgrade, refresh system version ...")
self._refresh_system_version(pkgversion)
#FIXME: 临时方案 PHP
PHPSeverSend(_send_log = self.window_main.configs_uncover.getWithDefault("SystemStatus", "upload_upgrade_log", False), _appname=pkgname, _appversion=pkgversion, _statue=status, _errorcode="10000100")
@ -370,6 +372,9 @@ class Sqlite3Server(object):
# 系统升级完成 ..判断版本号
if status == "success" and "kylin-update-desktop-system" in pkg_group:
# 更新版本号
if "=" in str(pkgversion):
pkgversion = str(pkgversion).split('=')[-1]
logging.info("Complete system upgrade, refresh system version ...")
self._refresh_system_version(str(pkgversion))
elif mode == InstallBackend.MODE_INSTALL_SYSTEM: # 全盘升级
@ -476,7 +481,7 @@ class Sqlite3Server(object):
update_version+='*'
self.ucconfigs.setValue("SYSTEM","update_version",str(update_version),True)
except Exception as e:
logging.error(str(e))
logging.error("Refresh system version error: %s.",str(e))
def get_default_version(self):
update_version = ""
@ -494,7 +499,7 @@ class Sqlite3Server(object):
if "=" in update_version:
update_version = update_version.split('=')[-1].strip()
except Exception as e:
logging.error(str(e))
logging.error("get_default_version error: %s .",str(e))
version_path = "/etc/os-release"
if os.path.isfile(version_path):
with open(version_path, "r+") as f:
@ -507,7 +512,7 @@ class Sqlite3Server(object):
update_version = os_version
elif update_version != "" and os_version == "":
os_version = update_version
return update_version,os_version
return str(update_version),str(os_version)
def get_current_version(self):
os_version = ''
@ -522,7 +527,7 @@ class Sqlite3Server(object):
logging.error(str(e))
return update_version,os_version
logging.info('Current os_version: %s, release_id: %s .', os_version, update_version)
return update_version,os_version
return str(update_version),str(os_version)
def get_cn_appname(self, name):
try:

View File

@ -1074,6 +1074,7 @@ class UpdateManagerDbusControllerUtils(dbus.service.Object):
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='ss', out_signature='b')
def DataBackendCollect(self, messageType, uploadMessage):
logging.info(COLORMETHOR_PREFIX+'Method'+COLORLOG_SUFFIX+' DataBackendCollect, messageType is %s ...',messageType)
logging.debug("uploadMessage: %s.", uploadMessage)
try:
self.parent.collector.UpdateMsg(messageType, uploadMessage)
except Exception as e:

View File

@ -804,7 +804,7 @@ class InstallBackend():
if self.window_main.collector.background_version[bl]:
UpdateMsg.update({"old_version":self.window_main.collector.background_version[bl]})
UpdateMsg.update({"new_version":self.window_main.collector.cache[bl].candidate.source_version})
self.window_main.collector.Upgrade_Process_Msg(self.action, UpdateMsg.copy())
# self.window_main.collector.Upgrade_Process_Msg(self.action, UpdateMsg.copy())
self.window_main.dbusController.UpdateInstallFinished(success,self.now_upgrade.upgrade_content,error_string,error_desc)

12
debian/changelog vendored
View File

@ -1,4 +1,14 @@
kylin-system-updater (2.0.5.3.1) v101; urgency=medium
kylin-system-updater (2.0.5.5) v101; urgency=medium
* BUG: #120948 【在线更新】断网时检测更新失败的文案何设计图不符
# 134470 【设计】安装失败日志语言显示异常
* 需求号: # 无
* 其他改动说明: 无
* 其他改动影响域:系统更新
-- luoxueyi <luoxueyi@kylinos.cn> Thu, 04 Aug 2022 09:28:58 +0800
kylin-system-updater (2.0.5.4) v101; urgency=medium
* BUG: #134497 【在线更新】打开设置-更新,自动更新按钮默认是“打开”状态
#134493 【在线更新】【PTOF】更新完成后重启系统打开设置-更新界面,提示“后台程序未启动”