162306a36Sopenharmony_ci# Select broken dependency issue
262306a36Sopenharmony_ci# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
362306a36Sopenharmony_ci#
462306a36Sopenharmony_ci# Test with:
562306a36Sopenharmony_ci#
662306a36Sopenharmony_ci# make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.select-break menuconfig
762306a36Sopenharmony_ci#
862306a36Sopenharmony_ci# kconfig will not complain and enable this layout for configuration. This is
962306a36Sopenharmony_ci# currently a feature of kconfig, given select was designed to be heavy handed.
1062306a36Sopenharmony_ci# Kconfig currently does not check the list of symbols listed on a symbol's
1162306a36Sopenharmony_ci# "select" list, this is done on purpose to help load a set of known required
1262306a36Sopenharmony_ci# symbols. Because of this use of select should be used with caution. An
1362306a36Sopenharmony_ci# example of this issue is below.
1462306a36Sopenharmony_ci#
1562306a36Sopenharmony_ci# The option B and C are clearly contradicting with respect to A.
1662306a36Sopenharmony_ci# However, when A is set, C can be set as well because Kconfig does not
1762306a36Sopenharmony_ci# visit the dependencies of the select target (in this case B).  And since
1862306a36Sopenharmony_ci# Kconfig does not visit the dependencies, it breaks the dependencies of B
1962306a36Sopenharmony_ci# (!A).
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_cimainmenu "Simple example to demo kconfig select broken dependency issue"
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ciconfig A
2462306a36Sopenharmony_ci	bool "CONFIG A"
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ciconfig B
2762306a36Sopenharmony_ci	bool "CONFIG B"
2862306a36Sopenharmony_ci	depends on !A
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ciconfig C
3162306a36Sopenharmony_ci	bool "CONFIG C"
3262306a36Sopenharmony_ci	depends on A
3362306a36Sopenharmony_ci	select B
34