Description of problem: dnf is very picky about how and when it matches a "*" in a wildcard match. I frequently have to experiment to find a pattern which actually matches installed packages; making a pattern less specific actually *stops* dnf from finding a match. This is a regression since "yum"; similar patterns work fine with yum on an older RHEL system. Version-Release number of selected component (if applicable): dnf-1.1.10-1.fc23.noarch How reproducible: 100% Steps to Reproduce: 1. Have more than one kernel rpm installed 2. $ sudo dnf remove "kernel*-4.7.3-100.fc23" works fine, finding multiple installed rpms: Removing: kernel x86_64 4.7.3-100.fc23 @updates 0 kernel-core x86_64 4.7.3-100.fc23 @updates 52 M kernel-devel x86_64 4.7.3-100.fc23 @updates 40 M kernel-modules x86_64 4.7.3-100.fc23 @updates 21 M kernel-modules-extra x86_64 4.7.3-100.fc23 @updates 2.0 M kmod-nvidia-4.7.3-100.fc23.x86_64 x86_64 1:367.44-1.fc23 @@commandline 17 M Is this ok [y/N]: N Operation aborted. But some *less* specific patterns fail, Matching the ".fc23" with a wildcard fails: $ sudo dnf remove "kernel*-4.7.3-100*" No match for argument: kernel*-4.7.3-100* And the "-" between N and V in the pattern is mandatory; removing it fails: $ sudo dnf remove "kernel*4.7.3-100.fc23" No match for argument: kernel*4.7.3-100.fc23 It appears that dnf is unable to glob-match the "-" or "." separators between N,V and R. NB. "yum list available..." has no such problem when run on an older RHEL box, and is able to match patterns like "kernel*2.6.32*" without trouble.
Thanks for the report. At least "kernel*-4.7.3-100*" should work. The rest of cases would be hard to support. That would need big redesign change.
(In reply to Jan Silhan from comment #1) > Thanks for the report. At least "kernel*-4.7.3-100*" should work. The rest > of cases would be hard to support. That would need big redesign change. Right, I figured globbing over separators might be deep in the design. It would be useful to target this as part of the yum compatibility work, though; it's exactly the sort of change in semantics that might trip up moving scripts from yum to dnf, as well as being a counter-intuitive UI behaviour.
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '23'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 23 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
(In reply to Fedora End Of Life from comment #3) > Thank you for reporting this issue and we are sorry that we were not > able to fix it before Fedora 23 is end of life. If you would still like > to see this bug fixed and are able to reproduce it against a later version > of Fedora, you are encouraged change the 'version' to a later Fedora > version prior this bug is closed as described in the policy above. Reproducible in f25. But it does seem improved: (In reply to Honza Silhan from comment #1) > Thanks for the report. At least "kernel*-4.7.3-100*" should work. The rest > of cases would be hard to support. That would need big redesign change. Yes, this format does now work in f25. Getting rid of an old updates-testing kernel: $ sudo dnf remove "kernel*4.8.10*" No match for argument: kernel*4.8.10* Error: No packages marked for removal. $ sudo dnf remove "kernel*-4.8.10*" Dependencies resolved. ... 4.8.10-100.fc23 @updates-testing 52 M
The problem with glob in releasever will be fixed in PR: https://github.com/rpm-software-management/libhif/pull/229 *** This bug has been marked as a duplicate of bug 1267895 ***
Reopening, a different bug was fixed but not the main one here. "foo-*" is still failing to match any components called "foo-$anything" (re-tested in f26). The pattern "foo*" works but that is not what I'm after; "foo-*" worked in yum, and this is a regression which is breaking certain searches for me. One example of a broken search: I would like to match "zlib" and its sub-packages. "dnf list zlib zlib-*" should work, but does not because "zlib-*" fails to find anything. "dnf list zlib*" will not work correctly here as that mistakenly pulls in the unrelated component zlibrary and its sub-packages.
I created a patch that should help (https://github.com/rpm-software-management/libdnf/pull/311).
Just tried the libdnf from the copr https://copr.fedorainfracloud.org/coprs/jmracek/nevra-parser/ and it appears to be working exactly as expected, for the examples I was having trouble with before. dnf list and update commands both give me the glob matching I expect. Many thanks!
libdnf-0.9.3-1.fc26 dnf-plugins-core-2.1.3-1.fc26 dnf-2.6.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6f4c06b2d7
dnf-2.6.2-1.fc26, dnf-plugins-core-2.1.3-1.fc26, libdnf-0.9.3-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6f4c06b2d7
Looks like the update is working as expected for list, install, update; karma left, thanks!
dnf-2.6.2-1.fc26, dnf-plugins-core-2.1.3-1.fc26, libdnf-0.9.3-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.