Skip to content

Commit ec6452a

Browse files
lacombarmichal42
authored andcommitted
kconfig: do not overwrite symbol direct dependency in assignment
Considering the following configuration: config F bool "F" choice AB bool "AB" config A bool "A" config B bool "B" endchoice if A config D bool default y if F select E config E bool "E" endif if B config D bool default y if F select E config E bool "E" endif The following configuration: CONFIG_F=y CONFIG_A=y # CONFIG_B is not set CONFIG_D=y CONFIG_E=y emits a spurious warning: (D) selects E which has unmet direct dependencies (B) If a symbol appears in two different branch of the tree, it should inherit the dependency of both parent, not just the last one. Reported-by: Yann E. Morin <yann.morin.1998@anciens.enib.fr> Tested-by: Yann E. Morin <yann.morin.1998@anciens.enib.fr> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
1 parent 36fee53 commit ec6452a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/kconfig/menu.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ void menu_finalize(struct menu *parent)
351351
last_menu->next = NULL;
352352
}
353353

354-
sym->dir_dep.expr = parent->dep;
354+
sym->dir_dep.expr = expr_alloc_or(sym->dir_dep.expr, parent->dep);
355355
}
356356
for (menu = parent->list; menu; menu = menu->next) {
357357
if (sym && sym_is_choice(sym) &&

0 commit comments

Comments
 (0)