mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
index.xml cannot handle APKs with the same packageName/versionCode
Really, it is the fdroidclient parser of index.xml that fails, due to the hardcoded expectation that there will only ever be a single APK for any given versionCode. We keep index.xml backwards compatible for old clients, and use index-v1.json to support new things. Having multiple APKs that have the same packageName and versionCode will break the client v0.103.* since that version uses index-v1.json, but still has the hard- coded database parsing stuff. #153
This commit is contained in:
parent
4053f03d77
commit
ceac6d25cb
2 changed files with 18 additions and 7 deletions
|
|
@ -294,9 +294,12 @@ def make_v0(apps, apks, repodir, repodict, requestsdict):
|
|||
|
||||
# Get a list of the apks for this app...
|
||||
apklist = []
|
||||
versionCodes = []
|
||||
for apk in apks:
|
||||
if apk['packageName'] == appid:
|
||||
apklist.append(apk)
|
||||
if apk['versionCode'] not in versionCodes:
|
||||
apklist.append(apk)
|
||||
versionCodes.append(apk['versionCode'])
|
||||
|
||||
if len(apklist) == 0:
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue