From b9f62bb4ef7808c0220d154c10c1c846f7c3361e Mon Sep 17 00:00:00 2001 From: Jean Raby Date: Wed, 23 Feb 2022 11:24:14 -0500 Subject: [PATCH] pacman: fix upgrade: yes (#4275) * s/sys-upgrade/sysupgrade/ * changelog fragment * yamllint * more fragment tweaks --- changelogs/fragments/4275-pacman-sysupgrade.yml | 3 +++ plugins/modules/packaging/os/pacman.py | 2 +- tests/unit/plugins/modules/packaging/os/test_pacman.py | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/4275-pacman-sysupgrade.yml diff --git a/changelogs/fragments/4275-pacman-sysupgrade.yml b/changelogs/fragments/4275-pacman-sysupgrade.yml new file mode 100644 index 0000000000..025cdc4ff1 --- /dev/null +++ b/changelogs/fragments/4275-pacman-sysupgrade.yml @@ -0,0 +1,3 @@ +bugfixes: + - pacman - fix ``upgrade=yes`` + (https://github.com/ansible-collections/community.general/pull/4275, https://github.com/ansible-collections/community.general/issues/4274). diff --git a/plugins/modules/packaging/os/pacman.py b/plugins/modules/packaging/os/pacman.py index af1590ee1a..4eec2499d1 100644 --- a/plugins/modules/packaging/os/pacman.py +++ b/plugins/modules/packaging/os/pacman.py @@ -410,7 +410,7 @@ class Pacman(object): cmd = [ self.pacman_path, "--sync", - "--sys-upgrade", + "--sysupgrade", "--quiet", "--noconfirm", ] diff --git a/tests/unit/plugins/modules/packaging/os/test_pacman.py b/tests/unit/plugins/modules/packaging/os/test_pacman.py index e1d3ae2d06..b0a92fb274 100644 --- a/tests/unit/plugins/modules/packaging/os/test_pacman.py +++ b/tests/unit/plugins/modules/packaging/os/test_pacman.py @@ -365,7 +365,7 @@ class TestPacman: # for real False, { - "args": ["pacman", "--sync", "--sys-upgrade", "--quiet", "--noconfirm"], + "args": ["pacman", "--sync", "--sysupgrade", "--quiet", "--noconfirm"], "return_value": [0, "stdout", "stderr"], }, None, @@ -377,7 +377,7 @@ class TestPacman: "args": [ "pacman", "--sync", - "--sys-upgrade", + "--sysupgrade", "--quiet", "--noconfirm", "--some",