1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 14:30:11 +01:00

Merge branch 'metadata' into 'master'

create_metadata: do not skip APK files having no name

See merge request !299
This commit is contained in:
Hans-Christoph Steiner 2017-07-05 20:31:23 +00:00
commit d28cc7337a

View File

@ -1718,13 +1718,15 @@ def main():
for apk in apks:
if apk['packageName'] not in apps:
if options.create_metadata:
if 'name' not in apk:
logging.error(apk['packageName'] + ' does not have a name! Skipping...')
continue
with open(os.path.join('metadata', apk['packageName'] + '.yml'), 'w') as f:
app = metadata.App()
app.Name = apk['name']
app.Summary = apk['name']
if 'name' in apk:
app.Name = apk['name']
app.Summary = apk['name']
else:
logging.warn(apk['packageName'] + ' does not have a name! Using package name instead.')
app.Name = apk['packageName']
app.Summary = apk['packageName']
app.CurrentVersionCode = 2147483647 # Java's Integer.MAX_VALUE
app.Categories = [os.path.basename(os.path.dirname(os.getcwd()))]
metadata.write_yaml(f, app)