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)