* Subtle Kconfig bug discovered
@ 2004-11-07 13:01 rikusw
0 siblings, 0 replies; only message in thread
From: rikusw @ 2004-11-07 13:01 UTC (permalink / raw)
To: linux-kernel
Hi
Here is a sample Kconfig file to show what this is all about.
//----snip----
#
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/kconfig-language.txt.
#
menu "Kconfig problem"
config DOIT
bool "To see what I mean set D and D1 to Y.
config TEST_A
bool "Test A"
default n
help
Top level config
config TEST_B
tristate "Test B"
default n
depends on TEST_A
help
Something depending on A
config TEST_C
bool "Test C"
default n
select TEST_B
help
Something depending on B
config TEST_D
bool "Test D"
default n
select TEST_C
help
Selecting C will cause it to be Y, but what about A and B ??
A and B is in another subsystem,
so D shouldn't know anything about them.
comment "Sugessted solution"
config README
bool "Read Me in help"
help
Should "depends on X" implicitly cause a "select X" ?
When X = 1&2&3 this is easy, but what when X = (1&2)|3 ???
The least LKC could do is to give a warning, if a disabled
option is selected.
I discovered this while working on fb_setup and i810fb.
A = I2C, B = I2C_ALGOBIT, C = I2C_I810 and D = FB_I810_I2C
Have a look at www.rootshell.be/~rikusw
The solution below doesn't require any changes to LKC,
the implicit select will.
config TEST_A1
bool "Test A1"
default n
help
config TEST_B1
tristate "Test B1"
default n
select TEST_A1
help
config TEST_C1
tristate "Test C1"
default n
select TEST_B1
help
If this is bool then B1 will b Y regardless whether D1 is M or Y...
config TEST_D1
tristate "Test D1"
default n
select TEST_C1
# select TEST_B1 - I don't want this because D1 is in another subsystem
# and shouldn't know anything about B1.
help
endmenu
//----snip----
I will be offline for the next 4-5 days bu, but please CC me at:
"rikusw" --> "rootshell.be"
Rikus Wessels
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-11-07 13:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-07 13:01 Subtle Kconfig bug discovered rikusw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox