From ac3e4f8a70bc350fd49848c28c988ff89d367467 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Fri, 5 Jun 2026 16:15:07 +0200 Subject: [PATCH] CI: apkbuild-lint: fix checking only the 1st file apkbuild-lint only checks the file from the first parameter: $ apkbuild-lint main/postmarketos-ui-phosh/APKBUILD IC[AL65]:main/postmarketos-ui-phosh/APKBUILD:66:2:non-local 'install' variable in function 'openrc'. Add install scripts to global install variable instead. MC[AL49]:main/postmarketos-ui-phosh/APKBUILD:46:1:invalid option 'pmb:drm' MC[AL49]:main/postmarketos-ui-phosh/APKBUILD:46:1:invalid option 'pmb:systemd' $ apkbuild-lint main/hello-world/APKBUILD main/postmarketos-ui-phosh/APKBUILD (empty output!) Loop over the APKBUILDs we want to lint so all of them get checked. Signed-off-by: Oliver Smith Part-of: --- .ci/lib/apkbuild_linting.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.ci/lib/apkbuild_linting.py b/.ci/lib/apkbuild_linting.py index c20d933db..f4b60acd5 100755 --- a/.ci/lib/apkbuild_linting.py +++ b/.ci/lib/apkbuild_linting.py @@ -57,7 +57,11 @@ if __name__ == "__main__": if len(apkbuilds_filtered) < 1: print("No APKBUILDs to lint") sys.exit(0) - try: - subprocess.run(["apkbuild-lint", *apkbuilds_filtered], text=True, check=True) - except subprocess.CalledProcessError as exception: - sys.exit(exception.returncode) + ret = 0 + for apkbuild in apkbuilds_filtered: + try: + cmd = ["apkbuild-lint", apkbuild] + subprocess.run(cmd, text=True, check=True) + except subprocess.CalledProcessError as exception: + ret = exception.returncode + sys.exit(ret)