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-15 14:26:33 +08:00
commit ba8a321190
3 changed files with 35 additions and 3 deletions

View File

@ -156,8 +156,9 @@ class UpdateMsgCollector():
dict_message = self.convertor.JsonConvertDict(json_message) dict_message = self.convertor.JsonConvertDict(json_message)
if messageType == "": if messageType == "":
messageType = "SystemUpdate" messageType = "SystemUpdate"
logging.debug("messageType: %s, json_message: %s ", messageType, json_message)
if type(dict_message) != type(dict) and "appname" not in dict_message.keys(): if type(dict_message) != type(dict) and "appname" not in dict_message.keys():
raise AttributeError("'%s' object has no attribute '%s'" % ("dict_message", "appname")) raise AttributeError("'%s' object has no attribute '%s'" % ("dict message", "appname"))
# 生成UploadMessage与PackageInfo # 生成UploadMessage与PackageInfo
try: try:
@ -325,6 +326,11 @@ class MessageSend():
elif retval == self.ERR_UPLOADMSG_CTS: elif retval == self.ERR_UPLOADMSG_CTS:
result = "The createTimeStamp field of UploadedMessage is abnormal" result = "The createTimeStamp field of UploadedMessage is abnormal"
logging.debug("Sent Status: false - packageName: %s : result: %s.", PackageInfo['packageName'], result) logging.debug("Sent Status: false - packageName: %s : result: %s.", PackageInfo['packageName'], result)
elif retval == self.ERR_UPLOADMSG_CTS:
result = "Invalid key included in \"uploadedMessage\" or \"packageInfo\": <@timestamp>,<_id>,<_index>,<_type>,<createTime>,<highlight>,<sn>,<sort>, check upload field"
logging.debug("Sent Status: false - packageName: %s : result: %s.", PackageInfo['packageName'], result)
else:
logging.debug("Sent Status: false - packageName: %s : retval: %s.", PackageInfo['packageName'], retval)
# 上传失败写入本地json # 上传失败写入本地json
if retval != self.ERR_NO_LOACLTID or retval == self.ERR_NO_LOACLTID: if retval != self.ERR_NO_LOACLTID or retval == self.ERR_NO_LOACLTID:
self.WriteToJson(PackageInfo['messageType'], json_PackageInfo, json_UploadMessage, encodeMsg) self.WriteToJson(PackageInfo['messageType'], json_PackageInfo, json_UploadMessage, encodeMsg)

View File

@ -150,7 +150,6 @@ class Sqlite3Server(object):
# 写入updateinfos表中 # 写入updateinfos表中
def insert_into_updateinfo(self, *args, **kwargs): def insert_into_updateinfo(self, *args, **kwargs):
logging.info(_("Inserting data into the database... "))
try: try:
self.cursor.execute( self.cursor.execute(
"insert into updateinfos (appname, version, description, date, status, keyword, errorcode, appname_cn, status_cn, changelog) values(?," "insert into updateinfos (appname, version, description, date, status, keyword, errorcode, appname_cn, status_cn, changelog) values(?,"
@ -272,7 +271,8 @@ class Sqlite3Server(object):
InstallInfos.update({"status":status}) InstallInfos.update({"status":status})
InstallInfos.update({"errorCode":str(error_string+" "+error_desc)}) InstallInfos.update({"errorCode":str(error_string+" "+error_desc)})
self.window_main.collector.Upgrade_Process_Msg("finish-install", InstallInfos.copy()) self.window_main.collector.Upgrade_Process_Msg("finish-install", InstallInfos.copy())
# 软件商店获取中文名insert_into_displayr(pkgname)) # 软件商店获取中文名
appname_cn = self.get_cn_appname(str(pkgname))
#FIXME: 临时方案 PHP #FIXME: 临时方案 PHP
PHPSeverSend(_send_log = self.window_main.configs_uncover.getWithDefault("SystemStatus", "upload_upgrade_log", False), _appname=pkgname, _appversion=pkgversion, _statue=status, _errorcode="10000100") PHPSeverSend(_send_log = self.window_main.configs_uncover.getWithDefault("SystemStatus", "upload_upgrade_log", False), _appname=pkgname, _appversion=pkgversion, _statue=status, _errorcode="10000100")
try: try:
@ -395,6 +395,8 @@ class Sqlite3Server(object):
logging.error(str(e)) logging.error(str(e))
try: try:
version = data['version'] version = data['version']
if "=" in version:
version = version.split("=")[1].strip()
tmpdescription = data['description'] tmpdescription = data['description']
appname_cn = data['name']['zh_CN'] appname_cn = data['name']['zh_CN']
except Exception as e: except Exception as e:

24
debian/changelog vendored
View File

@ -1,3 +1,27 @@
kylin-system-updater (2.0.5.4.1) v101; urgency=medium
* BUG: # 无
* 需求号: #15034 【更新升级】更新历史中新增自动更新结果显示
#15107】【更新升级】自动更新数据上报
#15089】【更新升级】【P2P】更新策略下发支持P2P配置内容下发(IP)
#15109】【更新升级】更新历史中增加历史更新内容日志显示
#15027】【更新升级】更新通知弹窗界面优化
#14380】【更新】搜索只能搜索包的全名不能模糊搜索也不能搜索别的字段
* 其他改动说明: 无
* 其他改动影响域:系统更新
-- luoxueyi <luoxueyi@kylinos.cn> Thu, 04 Aug 2022 09:28:58 +0800
kylin-system-updater (2.0.5.3) v101; urgency=medium
* BUG: # 125182 【安装器】在安全中心将应用程序来源检查设置为阻止双击安装未签名deb包安装失败但是日志为空
# 122183 【在线更新】上午8-12点外仍会弹出更新通知
* 需求号: 无
* 其他改动说明: 无
* 其他改动影响域:系统更新
-- luoxueyi <luoxueyi@kylinos.cn> Mon, 18 Jul 2022 10:48:43 +0800
kylin-system-updater (2.0.5.2) v101; urgency=medium kylin-system-updater (2.0.5.2) v101; urgency=medium
* BUG: #118026 【在线更新】英文环境下,安装和卸载应用时弹出授权界面,提示内容表述方式不一致 * BUG: #118026 【在线更新】英文环境下,安装和卸载应用时弹出授权界面,提示内容表述方式不一致