Bug 2276012 - "Do not download filelists by default" change broke `dnf repoquery -f`
Summary: "Do not download filelists by default" change broke `dnf repoquery -f`
Keywords:
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 40
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jan Kolarik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2254789
TreeView+ depends on / blocked
 
Reported: 2024-04-19 00:45 UTC by Adam Williamson
Modified: 2024-04-19 11:32 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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