1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 03:19:47 +03:00

pmbootstrap lint: use CUSTOM_VALID_OPTIONS (MR 1934)

Let apkbuild-lint check options again, and pass the pmbootstrap specific
options with the new CUSTOM_VALID_OPTIONS variable. Add a test case and
adjust pmb.helpers.lint.check to return the output of apkbuild-lint, so
we can properly test it.

Related: https://gitlab.alpinelinux.org/Leo/atools/-/merge_requests/28
Fixes: pmaports#553
This commit is contained in:
Oliver Smith 2020-05-03 11:35:10 +02:00
parent df08af7984
commit f3466dcd3f
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
4 changed files with 89 additions and 5 deletions

View file

@ -16,8 +16,9 @@ def check(args, pkgname):
pmb.build.init(args)
pmb.build.copy_to_buildpath(args, pkgname)
logging.info("(native) linting " + pkgname + " with apkbuild-lint")
pmb.chroot.user(args, ["apkbuild-lint", "APKBUILD"],
check=False, output="stdout",
working_dir="/home/pmos/build",
# Workaround, until we have CUSTOM_VALID_OPTIONS (#553)
env={"SKIP_INVALID_OPTION": "1"})
options = pmb.config.apkbuild_custom_valid_options
return pmb.chroot.user(args, ["apkbuild-lint", "APKBUILD"],
check=False, output="stdout",
output_return=True,
working_dir="/home/pmos/build",
env={"CUSTOM_VALID_OPTIONS": " ".join(options)})