mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Bug with multiple help messages, the last one is shown
@ 2005-03-22 17:32 Blaisorblade
  2005-03-22 20:00 ` Roman Zippel
  0 siblings, 1 reply; 3+ messages in thread
From: Blaisorblade @ 2005-03-22 17:32 UTC (permalink / raw)
  To: Roman Zippel, kbuild-devel; +Cc: LKML

I've verified multiple times that if we have a situation like this

bool A
depends on TRUE
help
  Bla bla1

and

bool A
depends on FALSE
help
  Bla bla2

even if the first option is the displayed one, the help text used is the one 
for the second option (the absence of "prompt" is not relevant here)!

>From a very short reading of sources, I guess that the problem is probably 
located in this line (from scripts/kconfig/zconf.y):

help: help_start T_HELPTEXT
{
        current_entry->sym->help = $2;
};

because the various current_entry values (matching the various definitions) 
share the same symbol (since of the sym_lookup call below)

config_entry_start: T_CONFIG T_WORD T_EOL
{
        struct symbol *sym = sym_lookup($2, 0);
        sym->flags |= SYMBOL_OPTIONAL;
        menu_add_entry(sym);
        printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), 
zconf_lineno(), $2);
};

Now, Kconfig handles well the same situation when there are multiple different 
prompts, instead of multiple help texts.

This because the "prompt" is added as a property with its own dependency; why 
is not this done for "help", too?
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug with multiple help messages, the last one is shown
  2005-03-22 17:32 Bug with multiple help messages, the last one is shown Blaisorblade
@ 2005-03-22 20:00 ` Roman Zippel
  2005-04-05 17:36   ` Blaisorblade
  0 siblings, 1 reply; 3+ messages in thread
From: Roman Zippel @ 2005-03-22 20:00 UTC (permalink / raw)
  To: Blaisorblade; +Cc: kbuild-devel, LKML

Hi,

On Tue, 22 Mar 2005, Blaisorblade wrote:

> I've verified multiple times that if we have a situation like this
> 
> bool A
> depends on TRUE
> help
>   Bla bla1
> 
> and
> 
> bool A
> depends on FALSE
> help
>   Bla bla2
> 
> even if the first option is the displayed one, the help text used is the one 
> for the second option (the absence of "prompt" is not relevant here)!

Is this based on a real problem? I know that there's currently one help 
text per symbol and the behaviour for multiple help texts is basically 
undefined.

bye, Roman

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug with multiple help messages, the last one is shown
  2005-03-22 20:00 ` Roman Zippel
@ 2005-04-05 17:36   ` Blaisorblade
  0 siblings, 0 replies; 3+ messages in thread
From: Blaisorblade @ 2005-04-05 17:36 UTC (permalink / raw)
  To: Roman Zippel; +Cc: kbuild-devel, LKML

Sorry for the late answer, Yahoo put your mail in its Spam folder, and I 
didn't check until now.

On Tuesday 22 March 2005 21:00, Roman Zippel wrote:
> Hi,
>
> On Tue, 22 Mar 2005, Blaisorblade wrote:
> > I've verified multiple times that if we have a situation like this
> >
> > bool A
> > depends on TRUE
> > help
> >   Bla bla1
> >
> > and
> >
> > bool A
> > depends on FALSE
> > help
> >   Bla bla2
> >
> > even if the first option is the displayed one, the help text used is the
> > one for the second option (the absence of "prompt" is not relevant here)!
>
> Is this based on a real problem?
Yes, look at the multiple help texts in lib/Kconfig.debug in vanilla 2.6.11, 
or, in the current bk tree, in lib/Kconfig.debug and arch/um/Kconfig for 
MAGIC_SYSRQ. For UML we need different help texts, so I'd like this solved.

If you definitely don't want to fix this, we can use the old 2.4 trick of 
having CONFIG_MAGIC_SYSRQ2, for instance, with the right help and defining 
MAGIC_SYSRQ as equal to MAGIC_SYSRQ2.
> I know that there's currently one help 
> text per symbol

> and the behaviour for multiple help texts is basically 
> undefined.
Yes, it's what I saw (actually I guess and seem to have verified that the last 
read text is used).
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-05 17:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-22 17:32 Bug with multiple help messages, the last one is shown Blaisorblade
2005-03-22 20:00 ` Roman Zippel
2005-04-05 17:36   ` Blaisorblade

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®