Commit 6cb2ecb
committed
fix(interactive): parse case alternatives in get_kernel_info_for_branch (#8957)
Fixes #8957.
The awk parser in get_kernel_info_for_branch() searched the family
conf for `^[[:space:]]*<branch>\)`, which matches a single-pattern
case label like `current)` but NOT a case label with alternation
like `vendor | vendor-rt)`. With no match, the function returned
an empty description and the menu fell back to a hardcoded label
("Vendor BSP kernel" for the vendor branch), so any custom
KERNEL_DESCRIPTION inside an alternation block was silently lost.
Fix: extract the label (everything before the closing paren),
split on `|` (with optional surrounding whitespace) and check each
alternative against the requested branch.
Real-world impact: families/k3.conf and families/k3-beagle.conf
both use `vendor | vendor-rt)` to share kernel/u-boot config
between the two branches. Their `KERNEL_DESCRIPTION` was effectively
dead code before this fix.
Single-label labels (`vendor-edge)`, `current)` etc.) continue to
match — they are just an n=1 case of the new alternation logic.
Assisted-by: Claude:claude-opus-4.71 parent b46e418 commit 6cb2ecb
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
250 | 251 | | |
251 | 252 | | |
252 | | - | |
253 | | - | |
254 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
255 | 265 | | |
256 | 266 | | |
257 | 267 | | |
| |||
0 commit comments