修改代码逻辑

This commit is contained in:
wangsong 2021-10-26 11:22:40 +08:00
parent b4bc6321eb
commit 3929a87009
3 changed files with 17 additions and 6 deletions

View File

@ -378,7 +378,7 @@ class UpdateList():
#源过滤
# fu = filter.UpdateListFilterCache()
# allowed_origin_upgrade_pkgs = fu.check_in_allowed_origin(pkgs_upgrade)
# pkgs_upgrade = fu.check_in_allowed_origin(pkgs_upgrade)
success,group_important_list,self.local_upgrade_data.single_pkgs,header,desc = self._read_important_list(cache,pkgs_upgrade)

View File

@ -100,7 +100,7 @@ class UpdateManager():
_success,header,desc = self.refresh_cache()
#特殊情况的处理 单独安装包需要直接退出 安装or卸载执行完毕后 还会调到start_available
if _success == False and header == INSTALL_ALONE_PROGRESS:
if _success == True and header == INSTALL_ALONE_PROGRESS:
return
else:
upgrade_list = self.update_list.local_upgrade_data.upgrade_groups + self.update_list.local_upgrade_data.single_pkgs
@ -129,7 +129,7 @@ class UpdateManager():
self.start_install(MODE_UPGRADE_SINGLE,True)
#直接退出
_success = False
_success = True
header = INSTALL_ALONE_PROGRESS
return _success,header,desc
else:
@ -139,15 +139,18 @@ class UpdateManager():
pkg_json.mark_install()
self.start_install(MODE_UPGRADE_SINGLE,True)
#直接退出
_success = False
_success = True
header = INSTALL_ALONE_PROGRESS
return _success,header,desc
#FIXME: 错误处理未做 报告到控制面板
except Exception as e:
header = _("Preparing the upgrade failed")
desc = _("groups JSON ConfigPkgs install failed")
logging.warning("groups JSON ConfigPkgs(%s) install failed...",GROUPS_PKG_NAME)
logging.error(e)
_success = False
return _success,header,desc
#FIXME:
#3、 判断目录是JSON配置文件夹是否缺失 缺失后进行修复 卸载重新安装步骤

View File

@ -1771,7 +1771,7 @@ msgstr "您可能无法检查更新或下载新的更新。"
#: ../UpdateManager/UpdateManager.py:1002
msgid "Could not initialize the package information"
msgstr ""
msgstr "无法初始化软件包信息"
#: ../UpdateManager/UpdateManager.py:1003
msgid ""
@ -1781,6 +1781,9 @@ msgid ""
"Please report this bug against the 'kylin-system-updater' package and include the "
"following error message:\n"
msgstr ""
"初始化包信息时遇到无法解决的问题。\n"
"\n"
"请汇报这个“kylin-system-updater”软件包的错误并且将如下信息包含在报告中\n"
#: ../UpdateManager/UpdateManager.py:1032
msgid ""
@ -1837,7 +1840,7 @@ msgstr "<b>新的 Ubuntu 发行版 %s 可用</b>"
#. we assert a clean cache
#: ../UpdateManager/UpdateManager.py:1153
msgid "Software index is broken"
msgstr ""
msgstr "软件索引已经损坏"
#: ../UpdateManager/UpdateManager.py:1154
msgid ""
@ -1845,6 +1848,8 @@ msgid ""
"manager \"Synaptic\" or run \"sudo apt-get install -f\" in a terminal to fix "
"this issue at first."
msgstr ""
"无法安装或删除任何软件。请使用新立得软件包管理器或在终端运行 \"sudo apt-get "
"install -f\" 来修正这个问题。"
#: ../UpdateManager/UnitySupport.py:57
msgid "Check for Updates"
@ -2568,3 +2573,6 @@ msgstr "检查升级包是否不存在本次升级"
msgid "read important list failed"
msgstr "读取推送升级列表失败"
msgid "groups JSON ConfigPkgs install failed"
msgstr "分组配置包安装失败"