Skip to content

kconfig: choice default is not set if hidden under invisible menu #39756

@sjanc

Description

@sjanc

Describe the bug
If choice with default value is under menu that is conditionally visible, default value is set only if menu is visible. This doesn't seem to affect config under same menu.

To Reproduce
menu SOME_MENU
visible if FOO

config BAR
bool "bar"
default y

choice BAZ_CHOICE
"choose baz"
default BAZ1

config BAZ1
bool "baz1"

config BAZ2
bool "baz2"

endchoice
endmenu

If FOO is not set, BAR=y , BAZ1 is unset
If FOO is set, BAR=y and BAZ1=y

Expected behavior
In example above BAZ1 should be set regardless of FOO value.

Impact
Blocks PR #39736

Metadata

Metadata

Assignees

Labels

area: KconfigbugThe issue is a bug, or the PR is fixing a bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions