mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
make sure indexes are sorted to minimize diffs between copies
With the binary transparency log stored in git, it makes that more readable and as small as possible if the index files are fully sorted. That will reduce the differences between two copies of an index file to a bare minimum. If in the future we implement some kind of binary diff transfer, this will also help there.
This commit is contained in:
parent
7d4176dd50
commit
5ad3486741
2 changed files with 8 additions and 8 deletions
|
|
@ -139,7 +139,7 @@ def make(apps, sortedids, apks, repodir, archive):
|
|||
appsWithPackages[packageName] = newapp
|
||||
break
|
||||
|
||||
requestsdict = dict()
|
||||
requestsdict = collections.OrderedDict()
|
||||
for command in ('install', 'uninstall'):
|
||||
packageNames = []
|
||||
key = command + '_list'
|
||||
|
|
@ -199,7 +199,7 @@ def make_v1(apps, packages, repodir, repodict, requestsdict):
|
|||
k = k[:1].lower() + k[1:]
|
||||
d[k] = v
|
||||
|
||||
output_packages = dict()
|
||||
output_packages = collections.OrderedDict()
|
||||
output['packages'] = output_packages
|
||||
for package in packages:
|
||||
packageName = package['packageName']
|
||||
|
|
@ -414,7 +414,7 @@ def make_v0(apps, apks, repodir, repodict, requestsdict):
|
|||
if perm_name.startswith("android.permission."):
|
||||
perm_name = perm_name[19:]
|
||||
old_permissions.add(perm_name)
|
||||
addElementNonEmpty('permissions', ','.join(old_permissions), doc, apkel)
|
||||
addElementNonEmpty('permissions', ','.join(sorted(old_permissions)), doc, apkel)
|
||||
|
||||
for permission in sorted_permissions:
|
||||
permel = doc.createElement('uses-permission')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue