Re: hidden string Kconfig ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 15, 2018 at 2:25 PM Daniel Walker <danielwa@xxxxxxxxx> wrote:
>
> On Thu, Nov 15, 2018 at 11:50:56AM +0900, Masahiro Yamada wrote:
> >
> >
> > In current Kconfig, a 'string' type symbol is written to the .config when
> >
> > [1] it has a visible prompt
> >     https://github.com/masahir0y/linux/blob/v4.19/scripts/kconfig/symbol.c#L364
> >
> >    or
> >
> > [2] it has a default property
> >     https://github.com/masahir0y/linux/blob/v4.19/scripts/kconfig/symbol.c#L421
> >
>
> Ok.
>
>
> >
> > I am open to changing the behavior
> > as long as it keeps grammatical consistency, though.
> >
> >
> > As far as I understood this particular case,
> > CONFIG_CMDLINE will go away after the GENERIC_CMDLINE migration is done.
> >
> > (At least, upstream x86 and powerpc defconfig files seem complete).
> >
> >
> >
> > Perhaps, some prompt for migration could be useful?
> >
> > config CMDLINE
> >         string "(LEGACY) Please make this empty and use CMDLINE_PREPEND instead"
>
> I think it would be confusing to leave it. The reason I wanted to have it in
> there silently is so I can print a warning, or BUILD_BUG_ON (which is what I
> currently do). Just so that people 1) don't lose those options, and 2) So that I
> can remind or catch people when they don't notice there was a change. Russell
> (ARM32 maintainer) complained in this regard.
>
> I'll look into the Kconfig code and see if I can make something acceptable.
>
> Daniel

Note that it'd be inconsistent for string symbols to respect user
values (values from .config files) when they don't have a prompt. A
prompt says that the symbol can be assigned a value by the user.
Assigning a symbol a value in a .config file is the same as assigning
it a value in the menuconfig interface.

(See my previous message for why promptless symbol still end up in
.config. The assignments to promptless symbols don't influence the
symbol's value on the Kconfig side.)

I wonder if having an exception for a one-off like this is really
worth it. It might make the Kconfig semantics harder to understand.
The rule now is that symbols without prompts always derive their value
from other symbols (via defaults, in this case).

See https://docs.zephyrproject.org/latest/application/kconfig-tips.html#optional-prompts
for a way to make prompts optional. Not sure if it'd be helpful here
though.

Cheers,
Ulf



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux