Fix some srpm stuff, split rather than strip, rsplit rather than rstrip.

This commit is contained in:
jkeating@dhcp83-49.boston.redhat.com 2006-12-11 17:13:02 -05:00 committed by Jesse Keating
parent 05d024e6ab
commit e93179577e

View File

@ -106,7 +106,7 @@ class Gather(yum.YumBase):
for po in self.polist: for po in self.polist:
srpm = po.returnSimple('sourcerpm').strip('.src.rpm') srpm = po.returnSimple('sourcerpm').split('.src.rpm')[0]
if not srpm in self.srpmlist: if not srpm in self.srpmlist:
self.srpmlist.append(srpm) self.srpmlist.append(srpm)
@ -178,7 +178,7 @@ 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) (sname, sver, srel) = srpm.rsplit('-', 2)
try: try:
srpmpo = self.pkgSack.searchNevra(name=sname, ver=sver, rel=srel)[0] srpmpo = self.pkgSack.searchNevra(name=sname, ver=sver, rel=srel)[0]
if not srpmpo in srpmpolist: if not srpmpo in srpmpolist: