rpm -qf questions

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

 



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

_______________________________________________
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