From bbb9b03b5e2d2966aff0cb20445d6260848596f1 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 16:34:38 +0100 Subject: [PATCH] [PR #11464/8b0ce3e2 backport][stable-12] community.general.copr: clarify includepkgs/excludepkgs (#11476) community.general.copr: clarify includepkgs/excludepkgs (#11464) At first glance, includepkgs seems to be something that would install the package name from the given copr repo. This isn't helped by the example that says "Install caddy" which very much looks like it is installing the package from the repo. Not only did I, a human, hallucinate this behaviour, so did a large search engine's AI responses to related queries. In fact these are labels to vary what packages DNF sees. Clarify this by using wording and examples closer to the upstream documentation [1] [1] https://dnf.readthedocs.io/en/latest/conf_ref.html (cherry picked from commit 8b0ce3e28ff9e669d4967f136d69efba7a6eaa14) Co-authored-by: Ian Wienand --- plugins/modules/copr.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/modules/copr.py b/plugins/modules/copr.py index f28f0206ad..0b8f6bc4c5 100644 --- a/plugins/modules/copr.py +++ b/plugins/modules/copr.py @@ -50,12 +50,14 @@ options: is run. type: str includepkgs: - description: List of packages to include. + description: + - List of packages to include in all operations. Inverse of O(excludepkgs), DNF will exclude any package in + the repository that does not match this list. Matches a name or a glob. type: list elements: str version_added: 9.4.0 excludepkgs: - description: List of packages to exclude. + description: List of packages in this repository to exclude from all operations. Matches a name or a glob. type: list elements: str version_added: 9.4.0 @@ -74,12 +76,14 @@ EXAMPLES = r""" state: absent name: '@copr/integration_tests' -- name: Install Caddy +- name: Install a repo where only packages starting with "python" that do not have i386 are seen by DNF community.general.copr: - name: '@caddy/caddy' + name: '@sample/repo' chroot: fedora-rawhide-{{ ansible_facts.architecture }} includepkgs: - - caddy + - 'python*' + excludepkgs: + - '*.i386' """ RETURN = r"""