1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-08-16 19:30:09 +02:00

fix read_metadata in fdroid build

Broken in fdroid/fdroidserver!828
This commit is contained in:
Hans-Christoph Steiner 2020-12-09 22:08:26 +01:00
parent ac5ed93428
commit 54e8867a7e
No known key found for this signature in database
GPG Key ID: 3E177817BA1B9BFA
2 changed files with 4 additions and 4 deletions

View File

@ -1005,7 +1005,7 @@ def main():
# Read all app and srclib metadata # Read all app and srclib metadata
pkgs = common.read_pkg_args(options.appid, True) pkgs = common.read_pkg_args(options.appid, True)
allapps = metadata.read_metadata(not options.onserver, pkgs, options.refresh, sort_by_time=True) allapps = metadata.read_metadata(pkgs, options.refresh, sort_by_time=True)
apps = common.read_app_args(options.appid, allapps, True) apps = common.read_app_args(options.appid, allapps, True)
for appid, app in list(apps.items()): for appid, app in list(apps.items()):

View File

@ -541,7 +541,7 @@ def read_srclibs():
srclibs[srclibname] = parse_yaml_srclib(metadatapath) srclibs[srclibname] = parse_yaml_srclib(metadatapath)
def read_metadata(appids=None, check_vcs=[], refresh=True, sort_by_time=False): def read_metadata(appids={}, refresh=True, sort_by_time=False):
"""Return a list of App instances sorted newest first """Return a list of App instances sorted newest first
This reads all of the metadata files in a 'data' repository, then This reads all of the metadata files in a 'data' repository, then
@ -549,7 +549,7 @@ def read_metadata(appids=None, check_vcs=[], refresh=True, sort_by_time=False):
sorted based on creation time, newest first. Most of the time, sorted based on creation time, newest first. Most of the time,
the newer files are the most interesting. the newer files are the most interesting.
check_vcs is the list of appids to check for .fdroid.yml in source appids is a dict with appids a keys and versionCodes as values.
""" """
@ -597,7 +597,7 @@ def read_metadata(appids=None, check_vcs=[], refresh=True, sort_by_time=False):
if appid in apps: if appid in apps:
_warn_or_exception(_("Found multiple metadata files for {appid}") _warn_or_exception(_("Found multiple metadata files for {appid}")
.format(appid=appid)) .format(appid=appid))
app = parse_metadata(metadatapath, appid in check_vcs, refresh) app = parse_metadata(metadatapath, appid in appids, refresh)
check_metadata(app) check_metadata(app)
apps[app.id] = app apps[app.id] = app