mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 07:52:35 +03:00
Leave apps out of the repo index if there are no packages
This commit is contained in:
parent
402b617e77
commit
8c9f28c7c4
1 changed files with 53 additions and 47 deletions
22
update.py
22
update.py
|
@ -237,10 +237,23 @@ root.appendChild(repoel)
|
|||
|
||||
apps_inrepo = 0
|
||||
apps_disabled = 0
|
||||
apps_nopkg = 0
|
||||
|
||||
for app in apps:
|
||||
|
||||
if app['disabled'] is None:
|
||||
|
||||
# Get a list of the apks for this app...
|
||||
apklist = []
|
||||
for apk in apks:
|
||||
if apk['id'] == app['id']:
|
||||
if str(apk['versioncode']) == app['marketvercode']:
|
||||
gotmarketver = True
|
||||
apklist.append(apk)
|
||||
|
||||
if len(apklist) == 0:
|
||||
apps_nopkg += 1
|
||||
else:
|
||||
apps_inrepo += 1
|
||||
apel = doc.createElement("application")
|
||||
apel.setAttribute("id", app['id'])
|
||||
|
@ -264,14 +277,6 @@ for app in apps:
|
|||
|
||||
gotmarketver = False
|
||||
|
||||
# Get a list of the apks for this app...
|
||||
apklist = []
|
||||
for apk in apks:
|
||||
if apk['id'] == app['id']:
|
||||
if str(apk['versioncode']) == app['marketvercode']:
|
||||
gotmarketver = True
|
||||
apklist.append(apk)
|
||||
|
||||
# Sort the apk list into version order, just so the web site
|
||||
# doesn't have to do any work by default...
|
||||
apklist = sorted(apklist, key=lambda apk: apk['versioncode'], reverse=True)
|
||||
|
@ -346,5 +351,6 @@ shutil.copyfile(repo_icon, iconfilename)
|
|||
print "Finished."
|
||||
print str(apps_inrepo) + " apps in repo"
|
||||
print str(apps_disabled) + " disabled"
|
||||
print str(apps_nopkg) + " with no packages"
|
||||
print str(warnings) + " warnings"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue