Bug 1547672 - wrong repoquery results
Summary: wrong repoquery results
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
Keywords: Reopened, Triaged
Depends On:
TreeView+ depends on / blocked
Reported: 2018-02-21 16:49 UTC by Tomasz Kłoczko
Modified: 2018-06-28 08:24 UTC (History)
6 users (show)

Clone Of:
Last Closed: 2018-06-28 08:24:01 UTC

Attachments (Terms of Use)

Description Tomasz Kłoczko 2018-02-21 16:49:01 UTC
# dnf -qC repoquery --whatrequires /sbin/ldconfig --qf="%{name}" | wc -l

Above query should show which one of the packages still requires /sbin/ldconfig.

For some reason reasons, this query shows to many packages requires /sbin/ldconfig.

The same query but with only changed query format string shows not the same number as above.

# dnf -qC repoquery --whatrequires /sbin/ldconfig --qf="%{name}.%{arch}" |wc -l

Comment 1 Jaroslav Mracek 2018-02-27 12:43:05 UTC
Please can you investigate the output in more details? I thing that output differs due to that repoquery returns only unique outputs like for two packages libdnf-1-5.x86_64 and libdnf-1-5.i686: 

--qf="%{name}" returns only:


but --qf="%{name}.%{arch}" returns


This is my explanation of different count of output lines. Please if this not the case, don't hesitate to reopen the bug report with additional information.

Anyway thanks for your report.

Comment 2 Tomasz Kłoczko 2018-02-27 13:19:35 UTC
No this is not due two archs.

If dnf shows you only libdnf as the only package which now requires /sbin/ldconfig try to compare it with rpm query.
Try to execute on your system:

# dnf repoquery --whatrequires /sbin/ldconfig

and compare it with:

# rpm -q --whatrequires /sbin/ldconfig

On my system:

# rpm -q --whatrequires /sbin/ldconfig | sort | uniq | wc -l


# (rpm -q --whatrequires /sbin/ldconfig | wc -l; dnf repoquery --whatrequires /sbin/ldconfig) | sort | uniq -d | wc -l
Last metadata expiration check: 1:04:03 ago on Tue 27 Feb 2018 12:10:10 GMT.

Theoretically, above command should show 88 because all those packages which on my system requires /sbin/ldconfig should appear on dnf output and after sorting both commands output I should have 88 duplicated entries.

Comment 3 Jaroslav Mracek 2018-02-27 14:19:53 UTC
I think you are looking for following command "dnf -Cq repoquery --whatrequires /sbin/ldconfig --exactdeps --installed"

Comment 4 Tomasz Kłoczko 2018-02-27 14:42:21 UTC
So moment .. what should return command:

dnf repoquery --whatrequires /sbin/ldconfig

And why it returns so many packages names which have nothing to do with /sbin/ldconfig dependencies?

And why this repoquery returns the different list of packages depends on query string?

Query string should be IMO affecting the only format of the output (like it is with rpm) .. not the query!!!

Comment 5 Jaroslav Mracek 2018-02-27 15:04:14 UTC
I am working on patch.

Comment 6 Jaroslav Mracek 2018-02-27 15:20:31 UTC
I create a patch that should solve your issue. Thanks for your time in explanation the issue.

Comment 7 Jaroslav Mracek 2018-06-28 08:24:01 UTC
The issue is solved by dnf-3.0.1-1 that was released into rawhide.

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