Bug 1169165 - let glob pattern describing package to match multiple packages
Summary: let glob pattern describing package to match multiple packages
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 21
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Michal Luscon
QA Contact: Fedora Extras Quality Assurance
: 1183439 1184529 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2014-11-30 22:57 UTC by Timur Kristóf
Modified: 2015-02-20 08:32 UTC (History)
8 users (show)

Clone Of:
Last Closed: 2015-02-20 08:32:35 UTC

Attachments (Terms of Use)

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):

How reproducible:

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.

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:
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.

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