kconfig: fix choice multi-display

In case a choices has different combinations, it can be displayed
more than once.

See the discussion thread on the linux-kbuild ML:
  http://www.spinics.net/lists/linux-kbuild/msg04709.html

The fix applied here was proposed by Arnaud LACOMBE.
That fix, or a similar one, will probably be pushed upstream soon.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
This commit is contained in:
Yann E. MORIN" 2011-05-10 22:45:33 +02:00
parent 3796ca5885
commit bb27382f3b

View File

@ -285,6 +285,11 @@ void menu_finalize(struct menu *parent)
} }
} }
} }
if (parent->prompt &&
!expr_is_yes(parent->prompt->visible.expr)) {
parent->visibility = expr_alloc_and (parent->visibility,
parent->prompt->visible.expr);
}
/* set the type of the remaining choice values */ /* set the type of the remaining choice values */
for (menu = parent->list; menu; menu = menu->next) { for (menu = parent->list; menu; menu = menu->next) {
current_entry = menu; current_entry = menu;