pacman: improve docs, make sure that packages is always returned, deprecate update_cache behavior (#4330)

* Improve docs, make sure that packages is always returned, deprecate update_cache behavior.

* Add cache_updated return value.

* Revert "Add cache_updated return value."

This reverts commit 367297bb5c.

* Update tests/unit/plugins/modules/packaging/os/test_pacman.py

Co-authored-by: Jean Raby <jean@raby.sh>

Co-authored-by: Jean Raby <jean@raby.sh>
This commit is contained in:
Felix Fontein 2022-03-11 06:54:05 +01:00 committed by GitHub
commit 10ca62905f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 8 deletions

View file

@ -0,0 +1,7 @@
bugfixes:
- "pacman - make sure that ``packages`` is always returned when ``name`` or ``upgrade`` is specified, also if nothing is done
(https://github.com/ansible-collections/community.general/pull/4329)."
deprecated_features:
- "pacman - from community.general 5.0.0 on, the ``changed`` status of ``update_cache`` will no longer be ignored if ``name`` or ``upgrade`` is specified.
To keep the old behavior, add something like ``register: result`` and ``changed_when: result.packages | length > 0`` to your task
(https://github.com/ansible-collections/community.general/pull/4329)."