调整代码逻辑
This commit is contained in:
parent
43d6300ef7
commit
bed7620366
|
@ -197,14 +197,14 @@ class UpdateManager():
|
|||
"message:\n") + str(e)
|
||||
_success = False
|
||||
return _success,header,desc
|
||||
|
||||
self.update_list = UpdateList(self)
|
||||
|
||||
#更新important.list
|
||||
if self.options.no_update_source is False:
|
||||
_success,header,desc = self.dbusController._on_update_important_list()
|
||||
if _success == False:
|
||||
return _success,header,desc
|
||||
|
||||
self.update_list = UpdateList(self)
|
||||
|
||||
#检查更新分组配置表
|
||||
_success,header,desc = self.check_group_config(self.cache)
|
||||
|
|
|
@ -194,9 +194,10 @@ class InstallBackendAptdaemon(InstallBackend):
|
|||
if action == self.ACTION_UPDATE: # 更新进度100后推迟发出100%的信号 -- 等待源过滤完成
|
||||
if progress != 100:
|
||||
self.window_main.dbusController.UpdateDetectStatusChanged(self.trans_progress,self.trans_status)
|
||||
else:
|
||||
if progress >= 50 and action != self.ACTION_DOWNLOADONLY:
|
||||
elif action == self.ACTION_INSTALL:
|
||||
if progress >= 50:
|
||||
LockedPreventShutdown()
|
||||
#升级的时候发送状态信号时需要上传更新组信息self.upgrade_groups_list
|
||||
upgrade_content = self.now_upgrade.upgrade_groups+self.now_upgrade.single_pkgs
|
||||
self.window_main.dbusController.UpdateDloadAndInstStaChanged(upgrade_content,self.trans_progress,self.trans_status,self.details)
|
||||
|
||||
|
@ -209,12 +210,12 @@ class InstallBackendAptdaemon(InstallBackend):
|
|||
if action == self.ACTION_UPDATE: # 更新进度100后推迟发出100%的信号 -- 等待源过滤完成
|
||||
if self.trans_progress != 100:
|
||||
self.window_main.dbusController.UpdateDetectStatusChanged(self.trans_progress,self.trans_status)
|
||||
elif action == self.ACTION_INSTALL and action == self.ACTION_INSTALL_DEB:
|
||||
#升级的时候发送状态信号时需要上传更新组信息self.upgrade_groups_list
|
||||
elif action == self.ACTION_INSTALL:
|
||||
#此处发不发信号一样 频率很低
|
||||
upgrade_content = self.now_upgrade.upgrade_groups+self.now_upgrade.single_pkgs
|
||||
self.window_main.dbusController.UpdateDloadAndInstStaChanged(upgrade_content,self.trans_progress,self.trans_status,self.details)
|
||||
elif action == self.ACTION_DOWNLOADONLY:
|
||||
pass
|
||||
# elif action == self.ACTION_DOWNLOADONLY:
|
||||
# pass
|
||||
|
||||
def _on_details_changed(self, trans, details):
|
||||
self.details = details
|
||||
|
|
Loading…
Reference in New Issue