From f93e30f1e9cdd4728e6ac6a2b4700f4fdb978588 Mon Sep 17 00:00:00 2001 From: linsui <2873532-linsui@users.noreply.gitlab.com> Date: Wed, 11 Dec 2024 23:14:06 +0800 Subject: [PATCH] lint: only error out on missing extlib on versions not archived --- fdroidserver/lint.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index 8f1f8d71..69b0ca91 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -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)