emit fix finish signal after each dpkg fix

This commit is contained in:
shenyafeng 2022-08-11 14:06:51 +08:00
parent b97e223427
commit fcbec61f10
1 changed files with 3 additions and 0 deletions

View File

@ -1081,6 +1081,9 @@ if __name__ == "__main__":
ret = subprocess.run(["dpkg -i %s"%pkgs],shell=True,stdout=open(logfile,'a+'),stderr=open(logfile,'a+'))
except Exception as e:
logging.error(e)
if ret.returncode == 0:
logging.info("dpkg fix success")
subprocess.Popen('dbus-send --system --type=signal / com.kylin.update.notification.FixFinish', shell=True)
# dpkg_fix = subprocess.run("dpkg --configure -a",shell=True,stdout=open(logfile,'a+'),stderr=open(logfile,'a+'))
abnormal_pkg_count = get_abnormally_installed_pkg_count()
logging.info("abnormal pkg count:%s"%(abnormal_pkg_count))