1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 14:30:11 +01:00

Don't allow for duplicate build entries

This commit is contained in:
Daniel Martí 2014-06-01 15:38:11 +02:00
parent 3d72c30fe5
commit a544907bef

View File

@ -649,6 +649,7 @@ def parse_metadata(metafile):
buildlines = []
curcomments = []
curbuild = None
vc_seen = {}
c = 0
for line in metafile:
@ -719,6 +720,10 @@ def parse_metadata(metafile):
.format(value, linedesc))
curbuild['version'] = vv[0]
curbuild['vercode'] = vv[1]
if curbuild['vercode'] in vc_seen:
raise MetaDataException('Duplicate build recipe found for vercode %s in %s' % (
curbuild['vercode'], linedesc))
vc_seen[curbuild['vercode']] = True
buildlines = []
mode = 3
elif fieldtype == 'obsolete':