修复优先升级的无法显示版本的问题

This commit is contained in:
wangsong 2022-08-30 09:20:42 +08:00
parent 68ccf46e44
commit 0331b94844
1 changed files with 18 additions and 15 deletions

View File

@ -258,22 +258,25 @@ class UpdateManager():
for pkg_name in [self.BACKEND_PKG_NAME,self.APTD_PKG_NAME,self.FRONTEND_PKG_NAME]:
if pkg_name in cache:
self_pkg = cache[pkg_name]
if self_pkg.is_installed and self_pkg.is_upgradable:
logging.info("Check: (%s) will upgrading From %s to %s...",pkg_name,\
self_pkg.installed.source_version,self_pkg.candidate.source_version)
if pkg_name in important_list:
try:
logging.info("Check: (%s) start upgrading From %s to %s...",pkg_name,\
self_pkg.installed.source_version,self_pkg.candidate.source_version)
self_pkg.mark_install(True,False,True)
self_upgrade.append(pkg_name)
need_upgrade = True
except SystemError:
self.simulate_mode.thread_install([pkg_name])
logging.error("Check: mark %s to upgrade Failed...",pkg_name)
raise UpdateBaseError(ERROR_NOT_SELFPKG_DEPENDENCIES)
if self_pkg.is_installed:
if self_pkg.is_upgradable:
logging.info("Check: (%s) will upgrading From %s to %s...",pkg_name,\
self_pkg.installed.source_version,self_pkg.candidate.source_version)
if pkg_name in important_list:
try:
logging.info("Check: (%s) start upgrading From %s to %s...",pkg_name,\
self_pkg.installed.source_version,self_pkg.candidate.source_version)
self_pkg.mark_install(True,False,True)
self_upgrade.append(pkg_name)
need_upgrade = True
except SystemError:
self.simulate_mode.thread_install([pkg_name])
logging.error("Check: mark %s to upgrade Failed...",pkg_name)
raise UpdateBaseError(ERROR_NOT_SELFPKG_DEPENDENCIES)
else:
logging.info("Check: (%s:%s) No need to upgrade and duo to not pust...",pkg_name,self_pkg.installed.source_version)
else:
logging.info("Check: (%s:%s) No need to upgrade and duo to not pust...",pkg_name,self_pkg.installed.source_version)
logging.info("Check: (%s:%s) No need to upgrade...",pkg_name,self_pkg.installed.source_version)
else:
logging.info("Check: (%s) Not to be installed...",pkg_name)
else: