Get the specific srpm used to build the binary

This commit is contained in:
jkeating@dhcp83-49.boston.redhat.com 2006-12-09 21:31:00 -05:00 committed by Jesse Keating
parent f376824c84
commit 7b27df1c01

View File

@ -106,7 +106,7 @@ class Gather(yum.YumBase):
for po in self.polist: for po in self.polist:
srpm = po.returnSimple('sourcerpm').rsplit('-', 2)[0] srpm = po.returnSimple('sourcerpm').strip('.src.rpm')
if not srpm in self.srpmlist: if not srpm in self.srpmlist:
self.srpmlist.append(srpm) self.srpmlist.append(srpm)
@ -178,10 +178,9 @@ class Gather(yum.YumBase):
self.doSackSetup(archlist=['src']) self.doSackSetup(archlist=['src'])
for srpm in self.srpmlist: for srpm in self.srpmlist:
(sname, sver, srel) = srpm.rstrip('-', 2)
try: try:
matches = self.pkgSack.searchNevra(name=srpm) srpmpo = self.pkgSack.searchNevra(name=sname, ver=sver, rel=srel)[0]
mysack = yum.packageSack.ListPackageSack(matches)
srpmpo = mysack.returnNewestByNameArch()[0]
if not srpmpo in srpmpolist: if not srpmpo in srpmpolist:
srpmpolist.append(srpmpo) srpmpolist.append(srpmpo)
except IndexError: except IndexError: