mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-06 11:00:13 +02:00
Don't allow duplicate version codes
This commit is contained in:
parent
bbc6b1afeb
commit
1ef0b0ca09
10
update.py
10
update.py
@ -2,7 +2,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# update.py - part of the FDroid server tools
|
# update.py - part of the FDroid server tools
|
||||||
# Copyright (C) 2010, Ciaran Gultnieks, ciaran@ciarang.com
|
# Copyright (C) 2010-11, Ciaran Gultnieks, ciaran@ciarang.com
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Affero General Public License as published by
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -328,6 +328,14 @@ for app in apps:
|
|||||||
# doesn't have to do any work by default...
|
# doesn't have to do any work by default...
|
||||||
apklist = sorted(apklist, key=lambda apk: apk['versioncode'], reverse=True)
|
apklist = sorted(apklist, key=lambda apk: apk['versioncode'], reverse=True)
|
||||||
|
|
||||||
|
# Check for duplicates - they will make the client unhappy...
|
||||||
|
for i in range(len(apklist) - 1):
|
||||||
|
if apklist[i]['versioncode'] == apklist[i+1]['versioncode']:
|
||||||
|
print "ERROR - duplicate versions"
|
||||||
|
print apklist[i]['apkname']
|
||||||
|
print apklist[i+1]['apkname']
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
for apk in apklist:
|
for apk in apklist:
|
||||||
apkel = doc.createElement("package")
|
apkel = doc.createElement("package")
|
||||||
apel.appendChild(apkel)
|
apel.appendChild(apkel)
|
||||||
|
Loading…
Reference in New Issue
Block a user