pkg5 with latest shouldn't ignore absent packages (#23006)

When the state is set to `latest` we should install absent packages, not just upgrade already-instaled packages.

This should fix #22823.
This commit is contained in:
Peter Oliver 2017-06-02 00:10:24 +01:00 committed by René Moser
parent ff35d23a27
commit d0d33262cb

View file

@ -128,7 +128,9 @@ def ensure(module, state, packages, params):
'subcommand': 'install', 'subcommand': 'install',
}, },
'latest': { 'latest': {
'filter': lambda p: not is_latest(module, p), 'filter': lambda p: (
not is_installed(module, p) or not is_latest(module, p)
),
'subcommand': 'install', 'subcommand': 'install',
}, },
'absent': { 'absent': {