chiark / gitweb /
some APKs do not have a name, like system APKs
authorHans-Christoph Steiner <hans@eds.org>
Tue, 3 Jun 2014 18:18:08 +0000 (14:18 -0400)
committerHans-Christoph Steiner <hans@eds.org>
Thu, 5 Jun 2014 02:01:25 +0000 (22:01 -0400)
It is not necessarily a good idea to try to distribute system APKs via
FDroid, but `fdroid update` should just ignore APKs it cannot handle rather
than die and prevent a repo from being fully created.  This is necessary to
handle the automatic creation of repos, like for debug builds from a
Jenkins server.

fdroidserver/update.py

index 8cd6b0e39f9b52c52207820890b11905098ae022..27431c399d8a6264a00e304ce2402030b88988f6 100644 (file)
@@ -967,6 +967,9 @@ def main():
                 break
         if not found:
             if options.create_metadata:
+                if 'name' not in apk:
+                    logging.error(apk['id'] + ' does not have a name! Skipping...')
+                    continue
                 f = open(os.path.join('metadata', apk['id'] + '.txt'), 'w')
                 f.write("License:Unknown\n")
                 f.write("Web Site:\n")