How to parse an RPM file name?

Greg Swift gregswift at gmail.com
Tue Nov 26 15:46:53 UTC 2013


On Tue, Nov 26, 2013 at 9:34 AM, Tom Limoncelli <
tlimoncelli at stackoverflow.com> wrote:

>
> The nearest I found is this:
> rpm --queryformat "%{NAME} %{VERSION} %{RELEASE} %{ARCH}" -qp filename.rpm
> However that requires the package is installed.  In my case this isn't
> true.
>

the -p switch allows you to query the RPM file, rather than the installed
RPM.  This method is what I would recommend to minimize your headaches, but
it does require you to have all the files (which it appears you do)

-greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20131126/57ba14a1/attachment.html>


More information about the Rpm-list mailing list