Bug 1347105 - dnf repoquery returns no results by default with --whatrequires
Summary: dnf repoquery returns no results by default with --whatrequires
Keywords:
Status: CLOSED DUPLICATE of bug 1343880
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-16 04:47 UTC by bryant
Modified: 2016-06-20 12:02 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-20 12:02:32 UTC
Type: Bug


Attachments (Terms of Use)

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 ***


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