mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-09 00:40:11 +01:00
Don't allow for duplicate build entries
This commit is contained in:
parent
3d72c30fe5
commit
a544907bef
@ -649,6 +649,7 @@ def parse_metadata(metafile):
|
|||||||
buildlines = []
|
buildlines = []
|
||||||
curcomments = []
|
curcomments = []
|
||||||
curbuild = None
|
curbuild = None
|
||||||
|
vc_seen = {}
|
||||||
|
|
||||||
c = 0
|
c = 0
|
||||||
for line in metafile:
|
for line in metafile:
|
||||||
@ -719,6 +720,10 @@ def parse_metadata(metafile):
|
|||||||
.format(value, linedesc))
|
.format(value, linedesc))
|
||||||
curbuild['version'] = vv[0]
|
curbuild['version'] = vv[0]
|
||||||
curbuild['vercode'] = vv[1]
|
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 = []
|
buildlines = []
|
||||||
mode = 3
|
mode = 3
|
||||||
elif fieldtype == 'obsolete':
|
elif fieldtype == 'obsolete':
|
||||||
|
Loading…
Reference in New Issue
Block a user