mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Ignore failure to install new enough dnf-plugins-core
This prevents the pkg.check_db call if 0.1.15 is not able to be installed.
This commit is contained in:
parent
defe0859fd
commit
5b8646ce64
1 changed files with 26 additions and 19 deletions
|
@ -327,27 +327,34 @@ def _find_install_targets(name=None,
|
|||
if not (name in cur_pkgs and version in (None, cur_pkgs[name]))
|
||||
])
|
||||
if not_installed:
|
||||
problems = _preflight_check(not_installed, **kwargs)
|
||||
comments = []
|
||||
if problems.get('no_suggest'):
|
||||
comments.append(
|
||||
'The following package(s) were not found, and no possible '
|
||||
'matches were found in the package db: '
|
||||
'{0}'.format(', '.join(sorted(problems['no_suggest'])))
|
||||
)
|
||||
if problems.get('suggest'):
|
||||
for pkgname, suggestions in six.iteritems(problems['suggest']):
|
||||
try:
|
||||
problems = _preflight_check(not_installed, **kwargs)
|
||||
except CommandExecutionError:
|
||||
pass
|
||||
else:
|
||||
comments = []
|
||||
if problems.get('no_suggest'):
|
||||
comments.append(
|
||||
'Package \'{0}\' not found (possible matches: {1})'
|
||||
.format(pkgname, ', '.join(suggestions))
|
||||
'The following package(s) were not found, and no '
|
||||
'possible matches were found in the package db: '
|
||||
'{0}'.format(
|
||||
', '.join(sorted(problems['no_suggest']))
|
||||
)
|
||||
)
|
||||
if comments:
|
||||
if len(comments) > 1:
|
||||
comments.append('')
|
||||
return {'name': name,
|
||||
'changes': {},
|
||||
'result': False,
|
||||
'comment': '. '.join(comments).rstrip()}
|
||||
if problems.get('suggest'):
|
||||
for pkgname, suggestions in \
|
||||
six.iteritems(problems['suggest']):
|
||||
comments.append(
|
||||
'Package \'{0}\' not found (possible matches: '
|
||||
'{1})'.format(pkgname, ', '.join(suggestions))
|
||||
)
|
||||
if comments:
|
||||
if len(comments) > 1:
|
||||
comments.append('')
|
||||
return {'name': name,
|
||||
'changes': {},
|
||||
'result': False,
|
||||
'comment': '. '.join(comments).rstrip()}
|
||||
|
||||
# Check current versions against desired versions
|
||||
targets = {}
|
||||
|
|
Loading…
Add table
Reference in a new issue