Re: [RFC][PATCH] kconfig: introduce listunknownconfig

From: Sergey Senozhatsky
Date: Sun Aug 20 2023 - 01:57:23 EST


On (23/08/20 11:45), Sergey Senozhatsky wrote:
> >
> > A new target is not what I like to see.
> >
> >
> > We decided to add KCONFIG_VERBOSE, which will be used to
> > warn options accidentally disabled or downgraded.
>
> That doesn't seem cover the cases that I'm concerned with. I don't see
> anything related to "!sym" in the patch.
>
> What will KCONFIG_VERBOSE do if it reads the following config file?
>
> // assuming that both config options were valid and existed in the old
> // kernel, but were removed/renamed in the new kernel
>
> $ cat .config
> CONFIG_DISABLE_BUGS=y
> # CONFIG_ENABLE_WINAPI is not set
>
>
> I'd like to see warnings for both lines, even for config that is not
> set, because it maybe we set by a build script depending on USE flags
> for instance, so that build target may still refer to non-existent
> config.

It's also important to exit with an error when non-existent config symbols
are detected. Because that is an error. We are looking at a broken kernel
from the end user PoV: the kernel will compile, get rolled out and at some
point you'll start receiving bug reports of non-functioning peripheral
hardware and whatnot (e.g. some specific USB devices whose config symbol
has been renamed).

So `make FOO-config` should never succeed if old config contains unrecognized
symbols, it should never get to the compilation stage.

That is not what KCONFIG_VERBOSE does (at least in its current form),
as far as I can tell.