mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
lint: only error out on missing extlib on versions not archived
This commit is contained in:
parent
9b59d5cf48
commit
f93e30f1e9
1 changed files with 14 additions and 4 deletions
|
@ -526,13 +526,23 @@ def check_extlib_dir(apps):
|
|||
|
||||
used = set()
|
||||
for app in apps:
|
||||
for build in app.get('Builds', []):
|
||||
if app.Disabled:
|
||||
continue
|
||||
archive_policy = common.calculate_archive_policy(
|
||||
app, common.config['archive_older']
|
||||
)
|
||||
builds = [build for build in app.Builds if not build.disable]
|
||||
|
||||
for i in range(len(builds)):
|
||||
build = builds[i]
|
||||
for path in build.extlibs:
|
||||
path = Path(path)
|
||||
if path not in extlib_files:
|
||||
yield _(
|
||||
"{appid}: Unknown extlib {path} in build '{versionName}'"
|
||||
).format(appid=app.id, path=path, versionName=build.versionName)
|
||||
# Don't show error on archived versions
|
||||
if i >= len(builds) - archive_policy:
|
||||
yield _(
|
||||
"{appid}: Unknown extlib {path} in build '{versionName}'"
|
||||
).format(appid=app.id, path=path, versionName=build.versionName)
|
||||
else:
|
||||
used.add(path)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue