mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
yumpkg.py: add option to the command "check-update"
This commit is contained in:
parent
e931ed2517
commit
a96f7c09e0
1 changed files with 7 additions and 1 deletions
|
@ -896,7 +896,13 @@ def refresh_db(**kwargs):
|
|||
branch_arg = _get_branch_option(**kwargs)
|
||||
|
||||
clean_cmd = [_yum(), '--quiet', 'clean', 'expire-cache']
|
||||
update_cmd = [_yum(), '--quiet', 'check-update']
|
||||
|
||||
if __grains__.get('os_family') == 'RedHat' and __grains__.get('osmajorrelease') == '7':
|
||||
# This feature is disabled because it is not used by Salt. Furthermore, this feature lasts a lot with using large repo like EPEL
|
||||
update_cmd = [_yum(), '--quiet', '--setopt=autocheck_running_kernel=false', 'check-update']
|
||||
else:
|
||||
update_cmd = [_yum(), '--quiet', 'check-update']
|
||||
|
||||
for args in (repo_arg, exclude_arg, branch_arg):
|
||||
if args:
|
||||
clean_cmd.extend(args)
|
||||
|
|
Loading…
Add table
Reference in a new issue