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 bugzilla.redhat.com.

Bug 1169165

Summary: let glob pattern describing package to match multiple packages
Product: [Fedora] Fedora Reporter: Timur Kristóf <timur.kristof>
Component: dnfAssignee: Michal Luscon <mluscon>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: akozumpl, cra, jsilhan, mluscon, petersen, pnemade, rholy, tla
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hawkey-0.5.3-2.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-20 08:32:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Timur Kristóf 2014-11-30 22:57:26 UTC
Description of problem:
When supplying the command-line argument '--exclude' or '-x' to dnf install, dnf displays an error message instead of installing the matching packages and excluding the specified packages.

Version-Release number of selected component (if applicable):
dnf-0.6.1-1.fc21.noarch

How reproducible:
Always

Steps to Reproduce:
1. Open a root console
2. Type 'dnf install libreport-*.x86_64 -x *-devel'

Actual results:
dnf displays a "not installable" error message. See below for the pastebin of the exact output.

Expected results:
dnf should install every package that matches "libreport-*.x86_64" except those that match "*-devel"

Additional info:
The same command works as expected with yum.
Output of dnf: http://pastebin.com/m3i2HU4n
Output of yum: http://pastebin.com/vazFCv5G

Comment 1 Honza Silhan 2014-12-01 16:13:09 UTC
Thanks for the report. DNF tries to select only one package that best matches the pattern. In DNF it works if you set multilib_policy to all: `dnf install libreport-*.x86_64 -x *-devel --setopt=multilib_policy=all`. We should change that to search them all. It should first get all package names and then choose right architecture for each. I will fix it.

Comment 2 Timur Kristóf 2014-12-03 11:22:58 UTC
Hi Jan, thanks for your answer! Let me know when I can take a look at your fix. :)

Comment 3 Honza Silhan 2014-12-09 16:24:41 UTC
We should add new function to DNF - get_best_selectors, which  would return list of selectors. The list will have more than one value only if package description pattern has `*` inside package name.

Michael, take a look, please.

Comment 4 Honza Silhan 2015-01-19 12:44:09 UTC
*** Bug 1183439 has been marked as a duplicate of this bug. ***

Comment 5 Honza Silhan 2015-01-23 09:20:39 UTC
*** Bug 1184529 has been marked as a duplicate of this bug. ***

Comment 6 Fedora Update System 2015-02-16 00:03:22 UTC
dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21

Comment 7 Fedora Update System 2015-02-17 08:04:16 UTC
Package hawkey-0.5.3-2.fc21, dnf-plugins-core-0.1.5-1.fc21, dnf-0.6.4-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hawkey-0.5.3-2.fc21 dnf-plugins-core-0.1.5-1.fc21 dnf-0.6.4-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-2139/dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2015-02-20 08:32:35 UTC
hawkey-0.5.3-2.fc21, dnf-plugins-core-0.1.5-1.fc21, dnf-0.6.4-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.