mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #35884 from terminalmage/clarify-pkg-latest-logic
Add clarifying comments to the pkg.latest state, fix USE flag condition
This commit is contained in:
commit
6383451c99
@ -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):
|
||||
targets[pkg] = avail[pkg]
|
||||
# Package is up-to-date, but Gentoo USE flags are changing so
|
||||
# we need to add it to the targets
|
||||
targets[pkg] = cur[pkg]
|
||||
else:
|
||||
# Package either a) is not installed, or b) is installed and has an
|
||||
# upgrade available
|
||||
targets[pkg] = avail[pkg]
|
||||
|
||||
if problems:
|
||||
|
Loading…
Reference in New Issue
Block a user