fix(script): parse profile hooks when packages are inherited - #274
Open
alexsmolya wants to merge 2 commits into
Open
fix(script): parse profile hooks when packages are inherited#274alexsmolya wants to merge 2 commits into
alexsmolya wants to merge 2 commits into
Conversation
ventureoo
requested changes
Aug 29, 2026
ventureoo
approved these changes
Aug 30, 2026
ventureoo
left a comment
Member
There was a problem hiding this comment.
Lua's part of changes are LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #273
Summary & Root Cause
In
scripts/chwd,parse_profilespreviously coupled hook capture toif not profiles[profile].packages. For child profiles that inherit packages from their parent profile without defining their ownpackagesentry (such as[handheld.rog-ally]and[handheld.msi-claw]),profiles[profile].packagesremainednil, causing the parser to stay in the package-matching branch on every line and skip all hook extraction (post_install,post_remove,conditional_packages, etc.).As a result, profile installation succeeded in installing package dependencies, but
post_installnever executed and the required PipeWire/WirePlumber directory and symlink setup was not performed.Changes
packagespresence inscripts/chwdso all declared hooks on child profiles are parsed regardless of whetherpackagesis defined locally or inherited.src/profile.rs(handheld_profile_parse_test).tests/chwd_spec.luaasserting child profiles properly inherit packages and retain their own hooks.Validation
PASS(verifiedhandheld.rog-ally,handheld.msi-claw, and child hook overrides).cargo test: 24 passed, 0 failed.cargo clippy --all-targets -- -D warnings: clean.cargo fmt --check: clean.git diff --check: clean.