Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1955309 - Improperly formatted text string in dnf package_install
Summary: Improperly formatted text string in dnf package_install
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Linux
Target Milestone: ---
Assignee: Marek Blaha
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2021-04-29 20:18 UTC by Mark Faine
Modified: 2021-06-15 07:21 UTC (History)
9 users (show)

Fixed In Version: dnf-4.8.0-1.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-06-15 07:21:37 UTC
Type: Bug

Attachments (Terms of Use)

Description Mark Faine 2021-04-29 20:18:10 UTC
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


Comment 1 Marek Blaha 2021-06-03 11:46:13 UTC
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 ( does not contain lines like `excludepkgs=bacula-client`?

Comment 2 Mark Faine 2021-06-03 14:02:53 UTC
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.

Comment 3 Marek Blaha 2021-06-04 12:48:38 UTC
Right. I've filed bug to track better error messages:

Comment 4 Marek Blaha 2021-06-04 12:50:49 UTC
PR to fix improperly formatted string:

Comment 5 Fedora Update System 2021-06-15 07:21:37 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.