增加关闭自我升级的参数

This commit is contained in:
wangsong 2022-01-21 14:51:29 +08:00
parent 4687bdd407
commit 4b82c82e95
2 changed files with 9 additions and 3 deletions

View File

@ -324,9 +324,10 @@ class UpdateManager():
self._check_cache_broken(self.cache)
#检查自己是否需要升级更新
_success,header,desc = self._check_self_upgrade(self.cache)
if _success == False:
return _success,header,desc
if self.options.no_check_selfupgrade is False:
_success,header,desc = self._check_self_upgrade(self.cache)
if _success == False:
return _success,header,desc
#检查更新分组配置表
_success,header,desc = self._check_group_config(self.cache)

View File

@ -52,6 +52,11 @@ if __name__ == "__main__":
action="store_true", dest="no_check_network",
help=_("Quit and close check network"))
parser.add_option("--no-check-selfupgrade",
default=False,
action="store_true", dest="no_check_selfupgrade",
help=_("no check self(kylin-system-updater) upgrade"))
(options, args) = parser.parse_args()
if os.getuid() != 0: