allow extending or overriding the patching config from the userpatche…
Description
Motivation: allow adding extra device tree overlays in the user patches folder, similar to the patch folder.
Summary: with this change it becomes possible to add a userpatches/kernel/<variant>/0000.patching_config.yaml file in the userpatches directory which extends/overrides settings in the Armbian-build provided patch/kernel/<variant>/0000.patching_config.yaml.
Documentation summary for feature / change
I'm not sure if documentation is really needed, since this change makes the build system more consistent with respect to adding patches in the userpatches folder.
How Has This Been Tested?
Add a userpatches/kernel/<variant>/0000.patching_config.yaml file and make sure that it changes/overrides settings from the original patch/kernel/<variant>/0000.patching_config.yaml.
Checklist:
- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [X] My changes generate no new warnings
- [ ] Any dependent changes have been merged and published in downstream modules
Walkthrough
Constructor in lib/tools/common/patching_config.py was changed to remove special-case handling for zero-length yaml paths. It now initializes self.yaml_config as an empty dict and iterates over all provided yaml_config_file_paths, merging each file's ["config"] into self.yaml_config. Downstream computed values (e.g., patches_to_git_config, autopatch_makefile_dt_configs, dts_directories, overlay_directories) are derived from the merged configuration. No public/exported signatures were changed.
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
- armbian/build#8739 — Related change affecting how multiple patching YAML files (e.g., 0000.patching_config.yaml) are merged and processed.
Suggested labels
Patches
Pre-merge checks and finishing touches
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | You can run @coderabbitai generate docstrings to improve docstring coverage. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title Check | ✅ Passed | The pull request title "allow extending or overriding the patching config from the userpatches folder" directly aligns with the main change in the changeset. The modification to lib/tools/common/patching_config.py removes zero-length path handling and implements merging of multiple YAML config files instead of loading only the first one, which enables the exact functionality described in the title. The title is specific, concise, and clearly conveys the primary purpose of the change without ambiguity or unnecessary verbosity. |
| Description Check | ✅ Passed | The pull request description is clearly related to the changeset and provides meaningful context about the motivation and implementation. It explains that the change allows users to add a userpatches/kernel/<variant>/0000.patching_config.yaml file to extend or override settings from the default patching config, which directly corresponds to the code changes that merge multiple YAML config files. The description includes specific testing details and acknowledges the consistency benefit with the patch folder behavior, demonstrating a clear understanding of the modification's purpose and impact. |
✨ Finishing touches
- [ ] 📝 Generate docstrings
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
📜 Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📥 Commits
Reviewing files that changed from the base of the PR and between 9bf6062b226412300012e2cdd4b6305b2e937ede and caac53dd7ba897875d998d0d3a542e877e976041.
📒 Files selected for processing (1)
-
lib/tools/common/patching_config.py(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
lib/tools/common/patching_config.py (1)
lib/tools/common/dt_makefile_patcher.py (7)
auto_patch_all_dt_makefiles(281-305)__init__(22-37)auto_patch_dt_makefile(68-191)AutoPatcherParams(21-37)__init__(41-45)AutomaticPatchDescription(40-65)copy_bare_files(194-278)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
Hey @bertouttier! 👋
Thanks for submitting your first pull request to the Armbian project — we're excited to have you contributing! 🧡
Your effort doesn’t just improve Armbian — it benefits the entire community of users and developers.
If you'd like to stay informed about project updates or collaborate more closely with the team,
you can optionally share some personal contact preferences at armbian.com/update-data.
This helps us keep in touch without relying solely on GitHub notifications.
Also, don’t forget to ⭐ star the repo if you haven’t already — and welcome aboard! 🚀