ensure fdroiddata metadata file overrides .fdroid.yml in source

If the already parsed App instance from metadata/*.* has a field, then the
value coming from .fdroid.yml should not override it.
This commit is contained in:
Hans-Christoph Steiner 2017-01-11 22:42:41 +01:00
parent 7af7297ca8
commit 948689281a
1 changed files with 5 additions and 1 deletions

View File

@ -996,7 +996,11 @@ def parse_metadata(metadatapath, check_vcs=False):
vcs.gotorevision('HEAD') # HEAD since we can't know where else to go
if os.path.isfile(metadata_in_repo):
logging.debug('Including metadata from ' + metadata_in_repo)
app.update(parse_metadata(metadata_in_repo))
# do not include fields already provided by main metadata file
app_in_repo = parse_metadata(metadata_in_repo).field_dict()
for k, v in app_in_repo.items():
if k not in app.field_dict():
app.set_field(k, v)
post_metadata_parse(app)