Bug 1190991

Summary: Dnf repoquery --whatprovides doesn't search through files
Product: [Fedora] Fedora Reporter: Jan Zeleny <jzeleny>
Component: dnf-plugins-coreAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: akozumpl, bugs.michael, jsilhan, mluscon, packaging-team-maint, petersen, pnemade, rholy, tim.lauridsen, vondruch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-02 13:16:11 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 Jan Zeleny 2015-02-10 08:08:08 UTC
I'd like to use repoquery to find out what packages own specific file (or files). With the old repoquery this was covered when querying repos with --whatprovides. However this doesn't work in the dnf repoquery command.

Please consider adding the support. I don't care if the --whatprovides is extended or a new --what??? argument is created, both are acceptable solutions for me.

Comment 1 Radek Holy 2015-02-10 08:32:06 UTC
Hi Jan, thank you for the report.

Let me note that "dnf provides <filename>" already supports these kinds of queries. I wonder whether there is a use case where "dnf repoquery --whatprovides" is more helpful than "dnf provides" since I don't like these redundancies. On the other hand, I think the request is valid at least because it's intuitively missing in the "dnf repoquery" CLI. I'm just curious whether there is an important difference in uses of these two commands.

Comment 2 Jan Zeleny 2015-02-10 08:48:56 UTC
Ah, I had no idea that dnf provides works this way, thank you for enlightening me. The only substantial difference I can see is the output format. Repoquery output is more suitable for scripts and it can be tweaked using --queryformat.

I won't mind if the repoquery functionality is merged with other parts of dnf but in that case dnf should probably include some way to make the transition easier for users (as my ignorance demonstrates, users will still try to use the repoquery or dnf repoquery). I have a suspicion that man page might not do it in this case.

Comment 3 Vít Ondruch 2015-02-27 12:10:08 UTC
When I am trying to get some information about package, for example to know where certain provide comes from:

$ sudo dnf repoquery --whatprovides 'rubygem(spruz)'
Using metadata from Wed Feb 25 10:39:29 2015
rubygem-spruz-0:0.2.5-10.fc21.noarch

I would prefer to do minimal change to my query, e.g. this is first thing which comes to my mind, but doesn't work:

$ sudo dnf repoquery --whatprovides '/usr/bin/enum'
Using metadata from Wed Feb 25 10:39:29 2015


I probably don't want to change my query later to something like:

$ sudo dnf provides '/usr/bin/enum'
Using metadata from Wed Feb 25 10:39:29 2015
enum-1.1-6.fc21.x86_64 : Seq- and jot-like enumerator
Repozitář    : fedora

rubygem-spruz-0.2.5-10.fc21.noarch : Useful tools library in Ruby
Repozitář    : fedora


Not mentioning that format of "repoquery" out differs from "provides"

Comment 4 Radek Holy 2015-02-27 12:27:52 UTC
*** Bug 1197054 has been marked as a duplicate of this bug. ***

Comment 5 Jan Zeleny 2015-03-02 08:17:50 UTC
*** Bug 1196952 has been marked as a duplicate of this bug. ***

Comment 6 Honza Silhan 2015-03-02 13:16:11 UTC

*** This bug has been marked as a duplicate of bug 1196952 ***

Comment 7 Radek Holy 2015-08-11 11:58:24 UTC
*** Bug 1248201 has been marked as a duplicate of this bug. ***