From d44d3863eee0862e9beba9e36a7934b355dbe0ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Thu, 16 May 2013 21:45:25 +0200 Subject: [PATCH] Add "No Source Since:[Version]" field. I'll document it once we make sure it works fine. --- fdroidserver/common.py | 4 ++++ fdroidserver/update.py | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 3de3452e..88fdfee8 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -462,6 +462,7 @@ def parse_metadata(metafile, **kw): thisinfo['Repo Type'] = '' thisinfo['Repo'] = '' thisinfo['Requires Root'] = False + thisinfo['No Source Since'] = '' # General defaults... thisinfo['builds'] = [] @@ -631,6 +632,9 @@ def write_metadata(dest, app): writefield('Current Version') writefield('Current Version Code') mf.write('\n') + if len(app['No Source Since']) > 0: + writefield('No Source Since') + mf.write('\n') writecomments(None) mf.close() diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 1a5cd3d4..72daac8b 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -101,6 +101,8 @@ def update_wiki(apps, apks, verbose=False): wikidata += "We don't have the current version of this app." else: wikidata += "We have the current version of this app." + if len(app['No Source Since']) > 0: + wikidata += "This application has been partially or entirely been missing source code since version " + app['No Source Since'] wikidata += " (Check mode: " + app['Update Check Mode'] + ")\n\n" if len(app['Current Version']) > 0: wikidata += "The current (recommended) version is " + app['Current Version'] @@ -121,7 +123,9 @@ def update_wiki(apps, apks, verbose=False): wikidata += "Version code: " + str(apk['versioncode']) + '\n' wikidata += '\n[[Category:' + wikicat + ']]\n' - if validapks == 0 and not app['Disabled']: + if len(app['No Source Since']) > 0: + wikidata += '\n[[Category:Apps that are missing source code]]\n' + elif validapks == 0 and not app['Disabled']: wikidata += '\n[[Category:Apps with no packages]]\n' elif cantupdate and not app['Disabled']: wikidata += "\n[[Category:Apps we can't update]]\n"