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

Re: A question about --queryformat



On Tue, Dec 30, 2003 at 12:12:55PM -0500, Tom Diehl wrote:

> They both return /etc/auto.master for the filename. Is there a way to have
> rpm display the filename I am querying in the output?? Can someone tell
> me what the filename querytag is really displaying??

%{filenames} is a list of all the files belonging to the package, you are getting the first element:
                                                                                        
rpm -qf --qf '[%{name} %{filenames}\n]' /etc/auto.misc

AFAIK there is no tag which corresponds to the file/package that is being queried with qp/qf

You could do something like:

for file in /etc/auto.misc; do  rpm -qf --qf "%{name} $file\n" $file; done

Paul




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