I googled for this, but couldn\'t find how to query a non-installed RPM file for its information:
# rpm -qa blackfin-jtag-tools-09r1.1-2.i386.rpm
#
# rpm -qi bl
Related - Display Infos For Installed Package :
rpm -qi InstalledPackageName
@crazyscot did answer the question. Thanks.
Additionally, I found that specific querytags can also be leveraged this way, which wasn't obvious from reading the man page. So, for example, I found I can do the following:
rpm -qp --queryformat '%{ARCH}\n' foo.rpm
or, even:
xyz="ARCH"; rpm -qp --qf %{${xyz}} foo.rpm; echo ""
This works nicely for RPM's that are not installed, and leveraging the available querytags in the installed rpm
Here is more information about tags
When rpm is not-installed then (this will list the complete info, plus the list of contents in the package);
rpm -qipl <rpm_name.rpm>
When rpm is installed then;
rpm -qi <rpm_name.rpm>
For more on rpm-queries. For more on handy-queries.
there are lot of -i option used in above answers , best way to check :
For one rpms,
rpm -qlp <rpm-name>.rpm
For all rpms , search for your file with grep :
rpm -qpl *.rpm|grep <string or file name>
less <rpm_name.rpm>
Displays all that I need, same as 'rpm -qlpv'.
Very good resource: https://blog.packagecloud.io/eng/2015/10/13/inspect-extract-contents-rpm-packages/ .
rpm -qip foo.rpm