Fix some srpm stuff, split rather than strip, rsplit rather than rstrip.
This commit is contained in:
parent
05d024e6ab
commit
e93179577e
@ -106,7 +106,7 @@ class Gather(yum.YumBase):
|
||||
|
||||
|
||||
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:
|
||||
self.srpmlist.append(srpm)
|
||||
|
||||
@ -178,7 +178,7 @@ class Gather(yum.YumBase):
|
||||
self.doSackSetup(archlist=['src'])
|
||||
|
||||
for srpm in self.srpmlist:
|
||||
(sname, sver, srel) = srpm.rstrip('-', 2)
|
||||
(sname, sver, srel) = srpm.rsplit('-', 2)
|
||||
try:
|
||||
srpmpo = self.pkgSack.searchNevra(name=sname, ver=sver, rel=srel)[0]
|
||||
if not srpmpo in srpmpolist:
|
||||
|
Loading…
Reference in New Issue
Block a user