Re: on builds/randconfigs (was: [PATCH -next] thermal: depends on NET)

Linus Torvalds
2011-01-13T04:08:42Z

On Wed, Jan 12, 2011 at 7:48 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Steve,
>
> On Wed, 12 Jan 2011 22:45:40 -0500 Steven Rostedt <rostedt@goodmis.org> wrote:
>>
>> What happens if you have foo depends on bar || fib ?
>>
>> Do you automatically enable bar and fib?
>
> The plan was to error out and let the user decide ... or behave as we do
> and just warn?

One thing to notice is that a lot of the "a || b" conditionals tend to
be cases where one of the expressions is a known constant 'y'.

In other words, the most common case of "a || b" tends to be things
like "X86 || MIPS || POWER.." or possibly "PCI || ISA", where one of
the options will have been hard-coded by the initial architecture
config file - and would generally not be something that the user sets
at all.

Now that may not be _universally_ true, but a quick grep certainly
supports the notion that that is a very common case.

So I think we want the rule to be:

- check all entries in the "||" chain - and if one of them is already
set to 'y', then just ignore the dependency as trivially fulfilled

- if all are 'n' or unknown, error out (or warn)

and I think there won't be all that many cases where people get the
error in practice.

Linus