mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add clarifying comments to the pkg.latest state
These comments explain what is being done as we evaluate which packages need to be added to the install targets and which do not.
This commit is contained in:
parent
eda2ae0add
commit
1542fd4716
1 changed files with 6 additions and 0 deletions
|
@ -1626,15 +1626,21 @@ def latest(
|
|||
problems = []
|
||||
for pkg in desired_pkgs:
|
||||
if not avail[pkg]:
|
||||
# Package either a) is up-to-date, or b) does not exist
|
||||
if not cur[pkg]:
|
||||
# Package does not exist
|
||||
msg = 'No information found for \'{0}\'.'.format(pkg)
|
||||
log.error(msg)
|
||||
problems.append(msg)
|
||||
elif watch_flags \
|
||||
and __grains__.get('os') == 'Gentoo' \
|
||||
and __salt__['portage_config.is_changed_uses'](pkg):
|
||||
# Package is up-to-date, but Gentoo USE flags are changing so
|
||||
# we need to add it to the targets
|
||||
targets[pkg] = avail[pkg]
|
||||
else:
|
||||
# Package either a) is not installed, or b) is installed and has an
|
||||
# upgrade available
|
||||
targets[pkg] = avail[pkg]
|
||||
|
||||
if problems:
|
||||
|
|
Loading…
Add table
Reference in a new issue