A program in Python to get Source RPM's from cvs
Seth Vidal
skvidal at fedoraproject.org
Tue Apr 7 22:59:46 UTC 2009
On Tue, 7 Apr 2009, Paty Constantino wrote:
> Hi everyone,
>
> I'm doing a program in Python, which for now is taking an application name and gives you the corresponding source rpm, if
> you run the program the first thing that will appear is this:
>
Here's the equivalent using the yum modules:
import yum
import rpmUtils.miscutils
my = yum.YumBase()
my.conf.cache = 1
p = my.pkgSack.searchNevra(name='yum')[0]
print rpmUtils.miscutils.splitFilename(p.sourcerpm)
that should give you a tuple of name, ver, release, arch
also see yumdownloader --source
-sv
More information about the fedora-devel-list
mailing list