mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-05 17:01:06 +03:00
update: skip packages without metadata in index V1
If a package does not have a matching "app" metadata file, then it should not be added to the index. index V0 already does this properly.
This commit is contained in:
parent
a17b95a860
commit
77a65be9db
1 changed files with 5 additions and 2 deletions
|
@ -169,7 +169,7 @@ def make_v1(apps, packages, repodir, repodict, requestsdict):
|
|||
|
||||
appslist = []
|
||||
output['apps'] = appslist
|
||||
for appid, appdict in apps.items():
|
||||
for packageName, appdict in apps.items():
|
||||
d = collections.OrderedDict()
|
||||
appslist.append(d)
|
||||
for k, v in sorted(appdict.items()):
|
||||
|
@ -190,7 +190,7 @@ def make_v1(apps, packages, repodir, repodict, requestsdict):
|
|||
elif k == 'CurrentVersion': # TODO make SuggestedVersionName the canonical name
|
||||
k = 'suggestedVersionName'
|
||||
elif k == 'AutoName':
|
||||
if 'Name' not in apps[appid]:
|
||||
if 'Name' not in apps[packageName]:
|
||||
d['name'] = v
|
||||
continue
|
||||
else:
|
||||
|
@ -201,6 +201,9 @@ def make_v1(apps, packages, repodir, repodict, requestsdict):
|
|||
output['packages'] = output_packages
|
||||
for package in packages:
|
||||
packageName = package['packageName']
|
||||
if packageName not in apps:
|
||||
logging.info('Ignoring package without metadata: ' + package['apkName'])
|
||||
continue
|
||||
if packageName in output_packages:
|
||||
packagelist = output_packages[packageName]
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue