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:
Erik Johnson 2016-02-08 22:46:51 -06:00
parent defe0859fd
commit 5b8646ce64

View file

@ -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 = {}