From bc43694ca94c779430cfe0b8bac69b961089058f Mon Sep 17 00:00:00 2001 From: Eric G Date: Sun, 19 Jul 2020 12:07:38 +0200 Subject: [PATCH] pacman: Treat .zst package names as files (#650) * pacman: Treat .zst package names as files * pacman: add changelog for .zst support * pacman: refer to pull-request in changelog fragment Co-authored-by: Felix Fontein Co-authored-by: gileri Co-authored-by: Felix Fontein --- .../fragments/650_pacman_support_zst_package_files.yaml | 4 ++++ plugins/modules/packaging/os/pacman.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/650_pacman_support_zst_package_files.yaml diff --git a/changelogs/fragments/650_pacman_support_zst_package_files.yaml b/changelogs/fragments/650_pacman_support_zst_package_files.yaml new file mode 100644 index 0000000000..b1e4041271 --- /dev/null +++ b/changelogs/fragments/650_pacman_support_zst_package_files.yaml @@ -0,0 +1,4 @@ +bugfixes: + - pacman - treat package names containing .zst as package files during installation + (https://www.archlinux.org/news/now-using-zstandard-instead-of-xz-for-package-compression/, + https://github.com/ansible-collections/community.general/pull/650). diff --git a/plugins/modules/packaging/os/pacman.py b/plugins/modules/packaging/os/pacman.py index 1dfcbf3549..12ea790760 100644 --- a/plugins/modules/packaging/os/pacman.py +++ b/plugins/modules/packaging/os/pacman.py @@ -459,7 +459,7 @@ def main(): for i, pkg in enumerate(pkgs): if not pkg: # avoid empty strings continue - elif re.match(r".*\.pkg\.tar(\.(gz|bz2|xz|lrz|lzo|Z))?$", pkg): + elif re.match(r".*\.pkg\.tar(\.(gz|bz2|xz|lrz|lzo|Z|zst))?$", pkg): # The package given is a filename, extract the raw pkg name from # it and store the filename pkg_files.append(pkg)