kconfig check: move rules to kconfigcheck.toml
Move all kconfig rules from pmb.config to a separate toml file pmb/data/kconfigcheck.toml. This is a fallback, pmbootstrap now prefers loading kconfigcheck.toml from the currently checked out pmaports branch if it exists.
This finally allows having separate kconfig check rules per pmaports branch and makes the workflow of adjusting these rules much more pleasant as the rules and kernel configs can just be adjusted at the same time in pmaports!
This patch also moves the definition of what rules should be checked for community and main devices, those that have pmb:kconfigcheck-community in their linux APKBUILD, to the new kconfigcheck.toml. This should make it much more intuitive, previously one needed to find the place in the pmbootstrap source and edit it there.
Furthermore the "enforce_check" logic is removed. Previously pmbootstrap would print warnings for failed config checks in some cases, but not exit with error which was very confusing. Now exit 0 means all checks passed and exit 1 means, that there is at least one error.
Use toml for the file, as discussed in #2165 (closed). Python 3.11 has a native toml reader, use tomli for previous Python versions for compatibility.
Merge request reports
Activity
added 1 commit
- 8136a790 - CI: ignore 'import tomllib' in vermin
By Oliver Smith on 2024-06-23T21:30:25
mentioned in issue #2165 (closed)
By Oliver Smith on 2024-06-23T21:33:07
- Resolved by Administrator
- Resolved by Administrator
added 14 commits
-
974aa23e...8390a093 - 10 commits from branch
postmarketOS:master
- 48c347d9 - kconfig check: remove --kconfig-check-{name} args
- 274e3381 - pmb.helpers.frontend.kconfig: modernize
- 2de6cacf - kconfig check: move rules to kconfigcheck.toml
- 72602089 - CI: ignore 'import tomllib' in vermin
By Oliver Smith on 2024-06-24T20:17:06
Toggle commit list-
974aa23e...8390a093 - 10 commits from branch
added 10 commits
-
72602089...9daa888f - 6 commits from branch
postmarketOS:master
- 6f6cf1e8 - kconfig check: remove --kconfig-check-{name} args (MR 2333)
- b6058e35 - pmb.helpers.frontend.kconfig: modernize (MR 2333)
- 1dfaafe5 - kconfig check: move rules to kconfigcheck.toml (MR 2333)
- 6c4b4c49 - CI: ignore 'import tomllib' in vermin (MR 2333)
By Oliver Smith on 2024-06-30T16:04:44
Toggle commit list-
72602089...9daa888f - 6 commits from branch
Looks like nobody else currently has time to review this. Merging with 1 approval and all discussions resolved then, since the kernel config tests now represent the ones shipped in v24.06. This wouldn't be as elegant if we wait longer, change the kernel config checks in pmbootstrap master, then have to rebase this, and then need to add a separate file for v24.06.
By Oliver Smith on 2024-06-30T16:06:18
follow-up for pmaports in pmaports!5301 (merged)
By Oliver Smith on 2024-06-30T16:41:00