This commit is contained in:
luoxueyi 2021-10-25 09:36:40 +08:00
parent 84bdd2ba9b
commit b5ec356222
2 changed files with 13 additions and 0 deletions

View File

@ -60,6 +60,17 @@ class UpdateManager():
except Exception as e:
logging.error(str(e))
#download only 2.0
def start_download(self, pkgs):
try:
if self.options.no_update_source is False:
self.dbusController._on_update_important_list()
update_backend = get_backend(self, InstallBackend.ACTION_DOWNLOADONLY)
update_backend.start(partial_upgrade_list = pkgs)
except Exception as e:
logging.error(str(e))
#进行更新的操作
def start_update(self):
try:

View File

@ -40,6 +40,7 @@ class InstallBackend():
ACTION_INSTALL = 1
ACTION_INSTALL_DEB = 2
ACTION_CHECK_RESOLVER = 3
ACTION_DOWNLOADONLY = 4
def __init__(self, window_main, action):
self.window_main = window_main
@ -121,6 +122,7 @@ class InstallBackend():
self.window_main.dbusController.UpdateDependResloveStatus(_success,is_remove_pkgs,pkgs_remove,raw_description,delete_desc,header,desc)
else:
self.window_main.dbusController.DistupgradeDependResloveStatus(_success,is_remove_pkgs,pkgs_remove,raw_description,header,desc)
elif self.action == self.ACTION_DOWNLOADONLY:
elif self.action == self.ACTION_UPDATE:
self.is_updating = True
self.update()