Bug 2276012

Summary: "Do not download filelists by default" change broke `dnf repoquery -f`
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: dnfAssignee: Jan Kolarik <jkolarik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 40CC: daniel.mach, jkolarik, jmracek, jrohel, mblaha, packaging-team-maint, pkratoch, ppisar, rpm-software-management
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: dnf-4.21.0-1.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-28 08:26:45 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:
Bug Depends On:    
Bug Blocks: 2254789    

Description Adam Williamson 2024-04-19 00:45:11 UTC
I use `dnf repoquery -f` all the time to find out what package a file is in. It's extremely handy, both for everyday stuff and QA work.

I just tried to use it and found it didn't work properly:

[adamw@xps13a os-autoinst-distri-fedora (kiwi-container %)]$ sudo dnf repoquery -l distribution-gpg-keys | grep /usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-40-primary
/usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-40-primary

[adamw@xps13a os-autoinst-distri-fedora (kiwi-container %)]$ sudo dnf repoquery -f /usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-40-primary

that is, `repoquery -l` knows the distribution-gpg-keys package contains the file /usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-40-primary , but `repoquery -f` does not know it, as it should.

dnf5 works fine:

[adamw@xps13a os-autoinst-distri-fedora (kiwi-container %)]$ sudo dnf5 repoquery --file /usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-40-primary
Updating and loading repositories:
...
distribution-gpg-keys-0:1.102-1.fc40.noarch

but dnf5 is not the default yet, dnf still is. This seems like a major feature to break.

Comment 1 Jan Kolarik 2024-04-19 06:51:53 UTC
Hi Adam, thanks for the report. There was one oversight in the repoquery command where the filelists metadata were not automatically loaded. Fix was created upstream: https://github.com/rpm-software-management/dnf/pull/2083.