Bug 2174337 - dnf5 repoquery prints some packages twice
Summary: dnf5 repoquery prints some packages twice
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: amatej
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-01 08:07 UTC by Martin Banas
Modified: 2023-05-03 12:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-03 12:29:33 UTC
Type: Bug


Attachments (Terms of Use)
diff-y.log (24.38 KB, text/plain)
2023-03-01 08:07 UTC, Martin Banas
no flags Details

Description Martin Banas 2023-03-01 08:07:38 UTC
Created attachment 1947138 [details]
diff-y.log

Description of problem:
dnf5 repoquery prints some of the packages twice.

Version-Release number of selected component (if applicable):
[root@localhost ~]# dnf5 --version
dnf5 version 5.0.6
dnf5 plugin API version 1.0
libdnf5 version 5.0.6
libdnf5 plugin API version 1.0

How reproducible:
always

Steps to Reproduce:
a. compare dnf5 repoquery output to dnf repoquery output or
b. compare dnf5 repoquery | sort | wc -l with dnf5 repoquery | sort -u | wc -l

Actual results:
[root@localhost ~]# dnf5 repoquery | sort -u | wc -l
61526
[root@localhost ~]# dnf5 repoquery | sort | wc -l
61633

Expected results:
Same number of packages, as with dnf4:
[root@localhost ~]# dnf repoquery | sort -u | wc -l
Last metadata expiration check: 0:20:32 ago on Wed 01 Mar 2023 08:44:57 AM CET.
61524
[root@localhost ~]# dnf repoquery | sort | wc -l
Last metadata expiration check: 0:20:44 ago on Wed 01 Mar 2023 08:44:57 AM CET.
61524

Additional info:
Attached is the diff -y <(dnf repoquery | sort) <(dnf5 repoquery | sort) | grep -B2 -A2 '[<>]' output

Comment 1 amatej 2023-03-07 06:24:45 UTC
Thanks for the report.
This is because dnf5 doesn't de-duplicate the output yet.
Some packages can be present multiple times with the same nevra (for example in multiple repos).

I plan to resolve this in PR: https://github.com/rpm-software-management/dnf5/pull/318 but it is not yet implemented.


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