"rpm -qf ..." and "rpm -V ..." with Python API

James Antill james at fedoraproject.org
Fri Jul 7 04:10:11 UTC 2017

On Thu, 2017-07-06 at 15:01 -0500, Ian Pilcher wrote:
> I am looking for any hints, tips, tricks, documentation, or guidance on
> how I can do the equivalent of "rpm -qf ..." (is this file owned by an
> RPM) and "rpm -V ..." (has this file or its metadata been modified).
> If there's a better place to ask, please let me know.

rpm -qf is generally just a provides lookup Eg.:


 However note that this tends to be very slow if you are doing it a lot,
so it's often faster to just get all the files and look at them, Eg. yum
fs du ...


 Verify is significantly more complicated, most of it on yum side is:


...and a bit over 500 lines.

More information about the Rpm-list mailing list