Bug 1347105

Summary: dnf repoquery returns no results by default with --whatrequires
Product: [Fedora] Fedora Reporter: bryant
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: 23CC: jmracek, jsilhan, mluscon, packaging-team-maint, pnemade, RadekHolyPublic, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-20 12:02:32 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 bryant 2016-06-16 04:47:55 UTC
Description of problem:
I've noticed that sometimes new packages are installed during regular system updates and I wanted to see why that was. I was pointed to the dnf repoquery --whatrequires PACKAGE command to look at package dependencies. But by default this doesn't return anything useful:

$ dnf repoquery --whatrequires double-conversion
Last metadata expiration check: 0:11:59 ago on Wed Jun 15 21:31:33 2016.
$

That output is problematic as it doesn't give any useful output and also doesn't tell the user how to get useful output. I've found that rerunning the command with the --alldeps option gives the proper output:

$ dnf repoquery --whatrequires double-conversion --alldeps
Last metadata expiration check: 0:13:01 ago on Wed Jun 15 21:31:33 2016.
double-conversion-devel-0:2.0.1-6.fc23.i686
double-conversion-devel-0:2.0.1-6.fc23.x86_64
erlang-jiffy-0:0.8.5-8.fc23.x86_64
qt5-qtdeclarative-0:5.6.0-11.fc23.i686
qt5-qtdeclarative-0:5.6.0-11.fc23.x86_64
qt5-qtdeclarative-devel-0:5.6.0-11.fc23.i686
qt5-qtdeclarative-devel-0:5.6.0-11.fc23.x86_64

Now the documentation for the --alldeps option is terse and doesn't actually help at all (see http://dnf-plugins-core.readthedocs.io/en/latest/repoquery.html). Not only is there no discoverability for this, there's no way to understand why this works just from the docs.

So my suggestion is to change the default behavior of --whatrequires to output meaningful data by default and then to also proper output when there are no results such that a user can refine their query. I understand the output of this command is supposed to be easily machine-readable, but there's gotta be a better way for this command to work then to just display nothing until an effectively undocumented flag is set and then do the right thing.

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

Comment 1 Jaroslav Mracek 2016-06-20 12:02:32 UTC
The default behavior was changed but fix is under review.
 https://github.com/rpm-software-management/dnf/pull/505

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