diff --git a/SystemUpdater/backend/__init__.py b/SystemUpdater/backend/__init__.py index 6672382..ca01912 100644 --- a/SystemUpdater/backend/__init__.py +++ b/SystemUpdater/backend/__init__.py @@ -105,12 +105,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)