Description of problem: This is actually a bug in dnf. This is an improperly formatted text format string inside the dnf code. raise dnf.exceptions.PackageNotFoundError(_('No match for argument: %s'), pkg.location) Version-Release number of selected component (if applicable): RHEL 8.3 See: https://github.com/ansible/ansible/issues/74504
Although there indeed is an error in the exception description, this is not the root cause of your issue. It only causes that the error message contains redundant `%s` string: No match for argument: %s: /tmp/bacula-client-5.2.13-23.1.el7.x86_64.rpm instead of the correct No match for argument: /tmp/bacula-client-5.2.13-23.1.el7.x86_64.rpm This minor issue will be of course fixed. I tried to reproduce problem from the ansible issue #74504 and eventually I succeeded when the bacula-client package was excluded on the target system. There are several places where you can setup the exclusions but most probable seems to me /etc/dnf/dnf.conf (the others places are repofiles in /etc/yum.repos.d/*.repo and the versionlock plugin). Please can you check that /etc/dnf/dnf.conf on the target RHEL system (myserver.host.domain) does not contain lines like `excludepkgs=bacula-client`?
It's possible that was the cause. I am using the yum versionlock plugin to exclude the package to ensure that a newer version is not installed. If it is indeed caused by package exclusion, then perhaps a better error message would help.
Right. I've filed bug to track better error messages: https://bugzilla.redhat.com/show_bug.cgi?id=1967927
PR to fix improperly formatted string: https://github.com/rpm-software-management/dnf/pull/1776
FEDORA-2021-78c5f8c03d has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.