Is there a way to query dnf to tell which which repo a given file or a given rpm came from?
Thanks, Neal
On 2020-03-17 21:33, Neal Becker wrote:
Is there a way to query dnf to tell which which repo a given file or a given rpm came from?
You mean like
[egreshko@meimei ~]$ dnf info vlc
Installed Packages Name : vlc Epoch : 1 Version : 3.0.9 Release : 33.fc31 Architecture : x86_64 Size : 5.5 M Source : vlc-3.0.9-33.fc31.src.rpm Repository : @System
From repo : rpmfusion-free-updates <----------------
Summary : The cross-platform open-source multimedia framework, player and : server URL : https://www.videolan.org License : GPLv2+ Description : VLC media player is a highly portable multimedia player and : multimedia framework capable of reading most audio and video : formats as well as DVDs, Audio CDs VCDs, and various streaming : protocols. It can also be used as a media converter or a server to : stream in uni-cast or multi-cast in IPv4 or IPv6 on networks.
2 steps: file -> RPM and then RPM -> Repo. File -> RPM rpm -qf /usr/bin/google-chrome google-chrome-stable-80.0.3987.132-1.x86_64
RPM -> Repo dnf info google-chrome-stable | grep -e ^Name -e ^From -e ^Version Name : google-chrome-stable Version : 80.0.3987.132 From repo : production-rhel-x86_64-workstation-csb-8.0
On Tue, Mar 17, 2020 at 9:34 AM Neal Becker ndbecker2@gmail.com wrote:
Is there a way to query dnf to tell which which repo a given file or a given rpm came from?
Thanks, Neal
John Westerdale
Sr Container Consultant
Red Hat https://www.redhat.com/
NYC Office/WFH
john.westerdale@redhat.com M: 201-376-9993 IM: jwesterd He / Him / His https://www.redhat.com/
Neal Becker wrote:
Is there a way to query dnf to tell which which repo a given file or a given rpm came from?
To add one more option to the list, the dnf repoquery command can show the repo:
$ dnf -q repoquery --latest-limit 1 --queryformat '%{name} %{reponame}' rpm rpm updates
$ dnf -q repoquery --latest-limit 1 --queryformat '%{name} %{reponame}' /usr/bin/rpm rpm updates
The dnf man page lists the other options that repoquery takes and covers the --querytags option to list what tags are available. It's very similar to the rpm option of the same name, but with additions like the reponame that dnf knows about.