diff --git a/SystemUpdater/backend/__init__.py b/SystemUpdater/backend/__init__.py index 6a34e11..0064e87 100644 --- a/SystemUpdater/backend/__init__.py +++ b/SystemUpdater/backend/__init__.py @@ -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)