rpm -qf questions
Tan
tan.dalat at gmail.com
Fri Apr 10 22:12:12 UTC 2009
hello all,
firstly, i have a particular need to quickly query for package info given a
batch of files so, i've tried the following:
rpm -qf `cat files.list` --nodigest --nosignature
where files.list contains approximately 650 files. this query took 1s on my
machine to complete while repeatedly invoking the same query for each
filename took 1 min. however, rpm man page doesn't mention the -f (--file)
option can take a list of files so i'm quite hesitant to use this in my
script. can i reliably depend on this behavior?
secondly, i'd like to have the package name and the filename used in the
query to be printed in the format <package-name>:<filename>, so i've added a
--qf '%{NAME}:%{FILENAMES}\n' to the query. this does what i want but it
seems like a strange thing to do as FILENAMES is a list and should be
enclosed in the [ ] brackets. i've read the doc and my usage should output
something similarly to <package-name>: (array) instead. how can i print
out the package name and filename properly? thanks alot.
cheers,
tan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20090410/5f897899/attachment.htm>
More information about the Rpm-list
mailing list