Merge pull request #42586 from gdubroeucq/2016.11

[Fix] yumpkg.py: add option to the command "check-update"
This commit is contained in:
garethgreenaway 2017-07-27 16:51:59 -07:00 committed by GitHub
commit 549495831f

View file

@ -897,6 +897,11 @@ def refresh_db(**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 disable because it is not used by Salt and lasts a lot with using large repo like EPEL
update_cmd.append('--setopt=autocheck_running_kernel=false')
for args in (repo_arg, exclude_arg, branch_arg):
if args:
clean_cmd.extend(args)