diff --git a/backend/SystemUpdater/backend/InstallBackendAptdaemon.py b/backend/SystemUpdater/backend/InstallBackendAptdaemon.py index f8be9e1..e8a34f9 100644 --- a/backend/SystemUpdater/backend/InstallBackendAptdaemon.py +++ b/backend/SystemUpdater/backend/InstallBackendAptdaemon.py @@ -252,12 +252,10 @@ class InstallBackendAptdaemon(InstallBackend): #进度回调 def _on_progress_changed(self, trans,progress,action): + #不要101这种未知状态 if progress == 101: return - if progress == 11: - progress = 10 - self.trans_progress = progress self._dist_status_changed(action,self.now_upgrade.upgrade_groups+self.now_upgrade.single_pkgs,\ self.trans_progress,self.trans_status,self.details) @@ -273,7 +271,10 @@ class InstallBackendAptdaemon(InstallBackend): #分发进度状态和细节信息 def _dist_status_changed(self,action,upgrade_content = [],progress = 0,status = '',details = ''): if action == self.ACTION_UPDATE: # 更新进度100后推迟发出100%的信号 -- 等待源过滤完成 - if self.trans_progress != 100: + if progress == 11: + progress = 15 + + if progress != 100: self.window_main.dbusController.UpdateDetectStatusChanged(progress,status) elif action == self.ACTION_INSTALL: #50%时候 属于下载状态切换到安装状态的过程