#25863 fix - state.pkg: do preflight check only for non-installed packages

This commit is contained in:
Petr Demin 2015-07-30 17:49:30 +03:00 committed by rallytime
parent 98955057e0
commit 0f7f9637b4

View file

@ -302,7 +302,12 @@ def _find_install_targets(name=None,
# Takes extra time. Disable for improved performance
if not skip_suggestions:
# Perform platform-specific pre-flight checks
problems = _preflight_check(desired, **kwargs)
not_installed = dict([
(name, version)
for name, version in desired.items()
if not (name in cur_pkgs and version in (None, cur_pkgs[name]))
])
problems = _preflight_check(not_installed, **kwargs)
comments = []
if problems.get('no_suggest'):
comments.append(