From ba1a9d6cc58cb66c5b40b17bfb4360e1c3b65fc0 Mon Sep 17 00:00:00 2001 From: wangsong Date: Thu, 16 Dec 2021 15:10:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=BF=87=E5=AD=97=E7=AC=A6=E6=9D=A5?= =?UTF-8?q?=E8=AF=86=E5=88=AB=E6=98=AF=E9=AA=8C=E8=AF=81=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=87=BA=E7=8E=B0=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/SystemUpdater/backend/InstallBackendAptdaemon.py | 2 +- backend/SystemUpdater/backend/__init__.py | 4 ++++ backend/po/zh_CN.po | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/SystemUpdater/backend/InstallBackendAptdaemon.py b/backend/SystemUpdater/backend/InstallBackendAptdaemon.py index 5e6b951..f8c0e3c 100644 --- a/backend/SystemUpdater/backend/InstallBackendAptdaemon.py +++ b/backend/SystemUpdater/backend/InstallBackendAptdaemon.py @@ -352,7 +352,7 @@ class InstallBackendAptdaemon(InstallBackend): if self.action == self.ACTION_REMOVE_PACKAGES or self.action == self.ACTION_UPDATE: return - logging.info("\033[43;1m" + "Emitting" + "\033[0m" +" Cancelable: %r",Cancelable) + logging.info("\033[1;32m" + "Emitting" + "\033[0m" +" Cancelable: %r",Cancelable) self.window_main.dbusController.Cancelable(Cancelable) #增加取消信号的频发机制 self.trans_cancelable = Cancelable diff --git a/backend/SystemUpdater/backend/__init__.py b/backend/SystemUpdater/backend/__init__.py index a03dd17..a4c33b7 100644 --- a/backend/SystemUpdater/backend/__init__.py +++ b/backend/SystemUpdater/backend/__init__.py @@ -451,6 +451,10 @@ class InstallBackend(): self.window_main.dbusController.PurgePackagesFinished(success,error_string,error_desc) elif action == self.ACTION_INSTALL_DEB: + #FIXME: '\r\n: \r\n\r\n'就认为是验证失败 + if success == False and '\r\n: \r\n\r\n' in self.trans_error_details: + error_string = "Package validation failed and installation was rejected." + error_desc = '' self.window_main.dbusController.InstalldebFinished(success,error_string,error_desc) #将安装完成的插入数据库 安装失败的计算那些包安装失败了 分类插入数据库中 diff --git a/backend/po/zh_CN.po b/backend/po/zh_CN.po index ea14b1e..d46f878 100644 --- a/backend/po/zh_CN.po +++ b/backend/po/zh_CN.po @@ -2598,6 +2598,9 @@ msgstr "更新管理器升级完成,请重启控制面板后再进行系统更 msgid "Uninstallation completed" msgstr "卸载完成。" +msgid "Package validation failed and installation was rejected." +msgstr "软件包验证失败,拒绝安装。" + msgid "Other tasks are being updated and upgraded, please uninstall them later." msgstr "其他任务正在更新升级中,请稍后再卸载。"