repodiff: fixed name-ver-rel parsing in case of src.rpm

This commit is contained in:
icedphoenix 2012-09-13 18:20:04 +04:00
parent 2bcfa48b45
commit 657f8173b6

View file

@ -419,10 +419,12 @@ def RPMNameFilter(rpmname, disttagepoch):
string = rpmname.split('-')
lastpart = string.pop()
tmp = lastpart.split('.')
tmp.pop()
issrc = (tmp.pop() == "src")
if tmp[-1].startswith("mga"):
tmp.pop()
lastpart = '.'.join(tmp)
if (lastpart[0].isdigit() or (not lastpart.startswith(disttagepoch))) and\
(not lastpart.isdigit()):
((not lastpart.isdigit()) or issrc):
name = '-'.join(string[:-1])
ver = string[-1]
rel = lastpart