How to parse an RPM file name?

James Antill james at fedoraproject.org
Tue Nov 26 17:19:02 UTC 2013


On Tue, 2013-11-26 at 10:52 -0500, Tom Limoncelli wrote:
> On Tue, Nov 26, 2013 at 10:46 AM, Greg Swift <gregswift at gmail.com> wrote:
> > 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)
> 
> Sadly I don't have the files either.

 If you just have the filenames and want code in python, this is your
best bet:

from rpmUtils.miscutils import splitFilename

(n, v, r, e, a) = splitFilename(filename)



More information about the Rpm-list mailing list