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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

http://yum.baseurl.org/wiki/YumCodeSnippet/FindFileOwner

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

https://github.com/rpm-software-management/yum/blob/master/yumcommands.py#L4377

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

https://github.com/rpm-software-management/yum/blob/master/yum/packages.py#L1661

...and a bit over 500 lines.

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list



[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux