Bug 1547672 - wrong repoquery results
Summary: wrong repoquery results
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: Unspecified Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened, Triaged
Depends On:
Blocks:
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)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-06-28 08:24:01 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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
14031

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
18440

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:

libdnf

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

libdnf.i686
libdnf.x86_64


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
88

And:

# (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.
0

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.