chiark / gitweb /
Add "No Source Since:[Version]" field.
authorDaniel Martí <mvdan@mvdan.cc>
Thu, 16 May 2013 19:45:25 +0000 (21:45 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Thu, 16 May 2013 19:45:25 +0000 (21:45 +0200)
I'll document it once we make sure it works fine.

fdroidserver/common.py
fdroidserver/update.py

index 3de3452ec3867be7b4e003d15cd2c21b5945c8a9..88fdfee822cf72b7878e5deff0d80b05a310933e 100644 (file)
@@ -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()
 
index 1a5cd3d47e8f5c800b94eb8d9afd51cc1c39b86f..72daac8b13e4e127170af92632e0a03c04bdeaca 100644 (file)
@@ -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"