Do not keep "empty" modules (without sources).

`org.kde` dependency has no source. It used by kiwix-build to install the
correct sdk/platform.
This commit is contained in:
Matthieu Gautier 2018-12-12 11:28:45 +01:00
parent abf0e639e1
commit ac0685877b
1 changed files with 2 additions and 1 deletions

View File

@ -186,7 +186,8 @@ class FlatpakBuilder:
module['config-opts'] = builder.configure_option.split(' ')
manifest = MANIFEST.copy()
manifest['modules'] = list(modules.values())
modules = [m for m in modules.values() if m.get('sources')]
manifest['modules'] = modules
manifest_name = "{}.json".format(MANIFEST['app-id'])
manifest_path = pj(self.platform.buildEnv.build_dir, manifest_name)
with open(manifest_path, 'w') as f: