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.
pull/4420/head
Peter Oliver 2017-06-02 00:10:24 +01:00 committed by René Moser
parent ff35d23a27
commit d0d33262cb
1 changed files with 3 additions and 1 deletions

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': {