Skip to content
Snippets Groups Projects

kconfig check: move rules to kconfigcheck.toml

Merged Imported Administrator requested to merge kconfigcheck-toml into master
All threads resolved!

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Administrator
  • Author Owner

    I haven't yet looked at the kconfig check/edit code in any detail... I think @z3ntu might have though? If so would you mind reviewing this?

    By Caleb Connolly on 2024-06-23T22:52:17

  • Administrator added 14 commits · Imported

    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

    Compare with previous version

    By Oliver Smith on 2024-06-24T20:17:06

  • Administrator resolved all threads · Imported

    resolved all threads

    By Oliver Smith on 2024-06-24T20:17:20

  • Administrator requested review from @z3ntu and @Newbyte · Imported

    requested review from @z3ntu and @Newbyte

    By Oliver Smith on 2024-06-24T20:17:43

  • Administrator approved this merge request · Imported

    approved this merge request

    By Robert Eckelmann on 2024-06-24T22:00:49

  • Administrator added 10 commits · Imported

    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)

    Compare with previous version

    By Oliver Smith on 2024-06-30T16:04:44

  • Author Owner

    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

  • Administrator merged · Imported

    merged

  • Author Owner

    follow-up for pmaports in pmaports!5301 (merged)

    By Oliver Smith on 2024-06-30T16:41:00

  • Please register or sign in to reply
    Loading