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.
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.