Bug 1019170

Summary: handling wildcards in the version
Product: [Fedora] Fedora Reporter: Jiri Moskovcak <jmoskovc>
Component: dnfAssignee: Ales Kozumplik <akozumpl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: akozumpl, dfediuck, jzeleny, lnie, mls, packaging-team-maint, philipp, pnemade, rholy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: dnf-0.4.7-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-16 02:11:12 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
real world example of failing wildcards none

Description Jiri Moskovcak 2013-10-15 05:07:10 EDT
Created attachment 812392 [details]
real world example of failing wildcards

Description of problem:
I wanted to remove bunch of older kernel packages, but dnf doesn't recognize the wildcard '*' so I had to fallback to yum to do this.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. have multiple kernel packages installed
2. try to remove some of them using wildcards

Actual results:
dnf says: No packages marked for removal
yum removes the packages ok

Expected results:
dnf works as yum

Additional info:
please see the attachment for the real world example
Comment 1 Ales Kozumplik 2013-10-15 05:23:41 EDT
Thanks for the report Jiri.

This is possibly the kernel package specific, will take a look.
Comment 2 Philipp Dreimann 2013-10-24 12:38:49 EDT
I've another one?!

$ dnf list installed|grep gnutls
gnutls.x86_64                        3.1.13-3.fc20                       @System
gnutls.i686                          3.1.13-3.fc20                       @System
gnutls-c++.x86_64                    3.1.13-3.fc20                       @System
gnutls-dane.x86_64                   3.1.13-3.fc20                       @System
gnutls-utils.x86_64                  3.1.13-3.fc20                       @System

$ dnf downgrade gnutls*
Setting up Downgrade Process
Resolving dependencies
--> Starting dependency resolution
--> Finished dependency resolution
Error: package gnutls-c++-3.1.13-3.fc20.x86_64 requires gnutls(x86-64) = 3.1.13-3.fc20, but none of the providers can be installed

$ sudo yum downgrade gnutls*
Loaded plugins: changelog, fastestmirror, langpacks, merge-conf, refresh-packagekit
Loading mirror speeds from cached hostfile
 * fedora: ftp.informatik.uni-frankfurt.de
 * rpmfusion-free-rawhide: mirror.karneval.cz
 * rpmfusion-nonfree-rawhide: mirror.proserve.nl
 * updates: ftp.informatik.uni-frankfurt.de
 * updates-testing: ftp.informatik.uni-frankfurt.de
No Match for available package: gnutls-devel-3.1.13-2.fc20.i686
No Match for available package: gnutls-devel-3.1.13-2.fc20.x86_64
Resolving Dependencies
--> Running transaction check
---> Package gnutls.i686 0:3.1.13-2.fc20 will be a downgrade
---> Package gnutls.x86_64 0:3.1.13-2.fc20 will be a downgrade
---> Package gnutls.i686 0:3.1.13-3.fc20 will be erased
---> Package gnutls.x86_64 0:3.1.13-3.fc20 will be erased
---> Package gnutls-c++.x86_64 0:3.1.13-2.fc20 will be a downgrade
---> Package gnutls-c++.x86_64 0:3.1.13-3.fc20 will be erased
---> Package gnutls-dane.x86_64 0:3.1.13-2.fc20 will be a downgrade
---> Package gnutls-dane.x86_64 0:3.1.13-3.fc20 will be erased
---> Package gnutls-utils.x86_64 0:3.1.13-2.fc20 will be a downgrade
---> Package gnutls-utils.x86_64 0:3.1.13-3.fc20 will be erased
--> Finished Dependency Resolution

$ dnf list gnutls*
works as expected
Comment 3 Ales Kozumplik 2013-10-30 11:56:13 EDT
This is a missing capability of the hawkey library, it won't parse globbed version. Phillip, you are seeing a different bug, would you please open a new bugzilla with your comment plus the dnf version you see this? Thanks!
Comment 4 Michael Schröder 2013-10-30 14:12:28 EDT
Also, libsolv doesn't really downgrades of other packages. This is not a problem for zypper, as zypper will present solutions to the user if it runs into problems. Dnf just prints the problems end exits.

You can kind of work around this by setting HY_ALLOW_UNINSTALL if dnf is in "downgrade" mode, in that case libsolv is free to downgrade/uninstall packages that are in the way.
Comment 5 Ales Kozumplik 2013-10-31 11:27:42 EDT
Fixed by a series of patches to hawkey and the dnf commit 51c9d08. Will be included with the next DNF release in F20.
Comment 6 Fedora Update System 2013-11-11 08:44:03 EST
dnf-0.4.7-1.fc20 has been submitted as an update for Fedora 20.
Comment 7 Fedora Update System 2013-11-11 19:40:34 EST
Package dnf-0.4.7-1.fc20, hawkey-0.4.5-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.4.7-1.fc20 hawkey-0.4.5-1.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 8 lnie 2013-11-12 00:23:33 EST
fixed with the packages above,able to remove the right packages using '*'
Comment 9 Fedora Update System 2013-11-16 02:11:12 EST
dnf-0.4.7-1.fc20, hawkey-0.4.5-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.