This commit is contained in:
luoxueyi 2021-10-26 11:37:03 +08:00
commit 4d565cb56c
6 changed files with 27 additions and 19 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配置文件夹是否缺失 缺失后进行修复 卸载重新安装步骤
@ -188,7 +191,7 @@ class UpdateManager():
header = _("Could not initialize the package information")
desc = _("An unresolvable problem occurred while "
"initializing the package information.\n\n"
"Please report this bug against the 'update-manager' "
"Please report this bug against the 'kylin-system-updater' "
"package and include the following error "
"message:\n") + str(e)
_success = False

View File

@ -258,7 +258,7 @@ class UpdateManagerDbusController(dbus.service.Object):
#查询解决依赖 信号
@dbus.service.signal(UPDATER_DBUS_INTERFACE,signature='bbasasasss')
def UpdateDependResloveStatus(self, resolver_status, remove_status,remove_pkgs,pkg_raw_description,delete_desc,error_string='',error_desc='',):
logging.info(COLORLOG_PREFIX + "emit" + COLORLOG_SUFFIX +" UpdateDependResloveStatus:resolver_status = %r , resolver_status = %r , remove_pkgs = %a,pkg_raw_description = %a ,delete_desc = %a,error_string = %s , error_desc = %s ",\
logging.info(COLORLOG_PREFIX + "emit" + COLORLOG_SUFFIX +" UpdateDependResloveStatus:resolver_status = %r , resolver_status = %r , remove_pkgs = %a,pkg_raw_description = %a ,delete_desc = %s,error_string = %s , error_desc = %s ",\
resolver_status,remove_status,remove_pkgs,pkg_raw_description,delete_desc,error_string,error_desc)
#查询dist-upgrade解决依赖

View File

@ -270,7 +270,7 @@ class InstallBackend():
header = _("Could not calculate the upgrade")
desc = _("An unresolvable problem occurred while "
"calculating the upgrade.\n\n"
"Please report this bug against the 'update-manager' "
"Please report this bug against the 'kylin-system-updater' "
"package and include the following error "
"message:\n") + str(e)
logging.error(header + desc)
@ -305,7 +305,7 @@ class InstallBackend():
# 信息插入数据库 and 发送信号
if error_string != '' or error_desc != '':
logging.error(error_string + error_desc)
logging.info(error_string + error_desc)
self.window_main.sqlite3_server.insert_info(self.now_upgrade.upgrade_mode,self.now_upgrade.single_pkgs,self.now_upgrade.upgrade_groups,success,error_string,error_desc)
self.window_main.dbusController.UpdateDownloadFinished(success,upgrade_content,error_string,error_desc)

View File

@ -58,13 +58,10 @@ if __name__ == "__main__":
signal.signal(signal.SIGHUP, signal.SIG_IGN)
signal.signal(signal.SIGINT,signal_handler_term)
logging.basicConfig(format=FORMAT,level=logging.DEBUG)
logging.info("luoxueyi"+"123")
# if options.debug:
# logging.basicConfig(format=FORMAT,level=logging.DEBUG)
# else:
# logging.basicConfig(format=FORMAT,level=logging.INFO,filename = logfile(),filemode = 'a')
if options.debug:
logging.basicConfig(format=FORMAT,level=logging.DEBUG)
else:
logging.basicConfig(format=FORMAT,level=logging.INFO,filename = logfile(),filemode = 'a')
if os.getuid() != 0:
print(_("You need to be root to run this application"))

View File

@ -1771,22 +1771,25 @@ msgstr "您可能无法检查更新或下载新的更新。"
#: ../UpdateManager/UpdateManager.py:1002
msgid "Could not initialize the package information"
msgstr ""
msgstr "无法初始化软件包信息"
#: ../UpdateManager/UpdateManager.py:1003
msgid ""
"An unresolvable problem occurred while initializing the package "
"information.\n"
"\n"
"Please report this bug against the 'update-manager' package and include the "
"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 ""
"An unresolvable problem occurred while calculating the upgrade.\n"
"\n"
"Please report this bug against the 'update-manager' package and include the "
"Please report this bug against the 'kylin-system-updater' package and include the "
"following error message:"
msgstr ""
"在计算升级时遇到一个无法解决的问题。\n"
@ -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 "分组配置包安装失败"