mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
#25863 fix - state.pkg: do preflight check only for non-installed packages
This commit is contained in:
parent
98955057e0
commit
0f7f9637b4
1 changed files with 6 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue