From 33fa918a6953c3355b8c824f9219341a94cff172 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Thu, 13 May 2021 10:30:48 +0200 Subject: [PATCH 1/2] [status_json] Don't list disabled builds as needs updated Closes: #898 --- fdroidserver/update.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 43b6f26f..8069390f 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -182,12 +182,12 @@ def status_update_json(apps, apks): if appid not in failedBuilds: failedBuilds[appid] = [] failedBuilds[appid].append(build.versionCode) - if validapks == 0: - output['noPackages'].append(appid) - if not gotcurrentver: - output['needsUpdate'].append(appid) - if app.get('UpdateCheckMode') == 'None' and not app.get('Disabled'): - output['noUpdateCheck'].append(appid) + if validapks == 0: + output['noPackages'].append(appid) + if not gotcurrentver: + output['needsUpdate'].append(appid) + if app.get('UpdateCheckMode') == 'None': + output['noUpdateCheck'].append(appid) common.write_status_json(output, options.pretty) From 31c0078b538467d828f02c5f90118bab0ac9c2ef Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Thu, 13 May 2021 14:03:29 +0200 Subject: [PATCH 2/2] [status_json] Add list of archivePolicy0 --- fdroidserver/update.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 8069390f..0866d9f0 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -140,6 +140,7 @@ def status_update_json(apps, apks): output = common.setup_status_output(start_timestamp) output['antiFeatures'] = dict() output['disabled'] = [] + output['archivePolicy0'] = [] output['failedBuilds'] = dict() output['noPackages'] = [] output['needsUpdate'] = [] @@ -168,6 +169,8 @@ def status_update_json(apps, apks): validapks = 0 if app.get('Disabled'): output['disabled'].append(appid) + elif app.get("ArchivePolicy") and int(app["ArchivePolicy"][:-9]) == 0: + output['archivePolicy0'].append(appid) else: for build in app.get('Builds', []): if not build.get('disable'):