使用修复破损包的方式,增加出错后错误提示

This commit is contained in:
wangsong 2021-10-08 10:04:24 +08:00
parent 8d08edd6bd
commit b982eb5bb7
1 changed files with 6 additions and 1 deletions

View File

@ -77,7 +77,7 @@ class InstallBackend():
for pkg in pkgs_upgrade:
self.window_main.cache[pkg].mark_upgrade()
Fix.resolve()
Fix.resolve(True)
logging.info("Complete calculation of dependencies...")
@ -103,12 +103,17 @@ class InstallBackend():
return new_pkgs_install,new_pkgs_upgrade,new_pkgs_remove
except Exception as e:
logging.error(e)
return [],[],[]
def start(self,partial_upgrade_list = []):
#FIXME: 在下载升级的能抑制系统关闭或者睡眠 参考ubuntu此部分代码
if self.action == self.ACTION_INSTALL:
pkgs_install,pkgs_upgrade,pkgs_remove = self._make_problem_resolver(partial_upgrade_list)
if not pkgs_install and not pkgs_upgrade and not pkgs_remove:
return
try:
logging.info("commit install:%d , upgrade:%d remove:%d",len(pkgs_install),len(pkgs_upgrade),len(pkgs_remove))
self.commit(pkgs_install, pkgs_upgrade, pkgs_remove)