mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* s/group/groups/
Pacman accepts --group but the actual option name is --groups.
Allows use of other binaries with the same CLI interface as pacman (yay)
* changelog
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add note regarding pacman compat + --print-format
* Update plugins/modules/packaging/os/pacman.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit d4e92fc720
)
Co-authored-by: Jean Raby <jean@raby.sh>
This commit is contained in:
parent
a56879c1b0
commit
a0b22e4402
2 changed files with 15 additions and 3 deletions
9
changelogs/fragments/4312-pacman-groups.yml
Normal file
9
changelogs/fragments/4312-pacman-groups.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
bugfixes:
|
||||
- pacman - Use ``--groups`` instead of ``--group``
|
||||
(https://github.com/ansible-collections/community.general/pull/4312).
|
||||
|
||||
known_issues:
|
||||
- pacman - binaries specified in the ``executable`` parameter must support
|
||||
``--print-format`` in order to be used by this module.
|
||||
In particular, AUR helper ``yay`` is known not to currently support it
|
||||
(https://github.com/ansible-collections/community.general/pull/4312).
|
|
@ -52,7 +52,10 @@ options:
|
|||
|
||||
executable:
|
||||
description:
|
||||
- Name of binary to use. This can either be C(pacman) or a pacman compatible AUR helper.
|
||||
- Path of the binary to use. This can either be C(pacman) or a pacman compatible AUR helper.
|
||||
- Pacman compatibility is unfortunately ill defined, in particular, this modules makes
|
||||
extensive use of the C(--print-format) directive which is known not to be implemented by
|
||||
some AUR helpers (notably, C(yay)).
|
||||
- Beware that AUR helpers might behave unexpectedly and are therefore not recommended.
|
||||
default: pacman
|
||||
type: str
|
||||
|
@ -575,7 +578,7 @@ class Pacman(object):
|
|||
|
||||
installed_groups = defaultdict(set)
|
||||
dummy, stdout, dummy = self.m.run_command(
|
||||
[self.pacman_path, "--query", "--group"], check_rc=True
|
||||
[self.pacman_path, "--query", "--groups"], check_rc=True
|
||||
)
|
||||
# Format of lines:
|
||||
# base-devel file
|
||||
|
@ -600,7 +603,7 @@ class Pacman(object):
|
|||
|
||||
available_groups = defaultdict(set)
|
||||
dummy, stdout, dummy = self.m.run_command(
|
||||
[self.pacman_path, "--sync", "--group", "--group"], check_rc=True
|
||||
[self.pacman_path, "--sync", "--groups", "--groups"], check_rc=True
|
||||
)
|
||||
# Format of lines:
|
||||
# vim-plugins vim-airline
|
||||
|
|
Loading…
Reference in a new issue