[PATCH v1 2/3] Revert "build system: fix "allnoconfig" to clear all options. Closes 10296"

Charles Mirabile via busybox <[email protected]> Sun, 5 Jul 2026 17:00:31 -0400
Newsgroups gmane.linux.busybox
Message-ID <[email protected]>
This reverts commit 0b1c62934215a08351a80977c7cf8e9346683a1e.

That patch broke `KCONFIG_ALLCONFIG` support in kconfig (issue #11736) and
was just a band-aid solution to #10296. Reverting it closes #11736, but
(temporarily) reopens #10296 pending a subsequent fix.

Signed-off-by: Charles Mirabile <[email protected]>
---
 scripts/kconfig/conf.c | 54 ++----------------------------------------
 1 file changed, 2 insertions(+), 52 deletions(-)

diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index ccabf47ae..04ae81f79 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -76,51 +76,14 @@ static void conf_askvalue(struct symbol *sym, const char *def)
 
 	line[0] = '\n';
 	line[1] = 0;
-	line[2] = 0;
 
 	if (!sym_is_changable(sym)) {
 		printf("%s\n", def);
+		line[0] = '\n';
+		line[1] = 0;
 		return;
 	}
 
-	// If autoconf run (allnoconfig and such), reset bool and tristates:
-	// "select ITEM" sets ITEM=y and then parent item might have been
-	// reset to "n" later. Try to set ITEM to "n" on the second run.
-	if (type == S_BOOLEAN || type == S_TRISTATE) {
-		switch (input_mode) {
-		case set_yes:
-			if (sym_tristate_within_range(sym, yes)) {
-				line[0] = 'y';
-				line[1] = '\n';
-				printf("%s", line);
-				return;
-			}
-		case set_mod:
-			if (type == S_TRISTATE) {
-				if (sym_tristate_within_range(sym, mod)) {
-					line[0] = 'm';
-					line[1] = '\n';
-					printf("%s", line);
-					return;
-				}
-			} else {
-				if (sym_tristate_within_range(sym, yes)) {
-					line[0] = 'y';
-					line[1] = '\n';
-					printf("%s", line);
-					return;
-				}
-			}
-		case set_no:
-			if (sym_tristate_within_range(sym, no)) {
-				line[0] = 'n';
-				line[1] = '\n';
-				printf("%s", line);
-				return;
-			}
-		}
-	}
-
 	switch (input_mode) {
 	case set_no:
 	case set_mod:
@@ -629,19 +592,6 @@ int main(int ac, char **av)
 	if (input_mode != ask_silent) {
 		rootEntry = &rootmenu;
 		conf(&rootmenu);
-		// If autoconf run (allnoconfig and such), run it twice:
-		// "select ITEM" sets ITEM=y and then parent item
-		// is reset to "n" later. Second run sets ITEM to "n".
-		// Example: ADDUSER selects LONG_OPTS.
-		// allnoconfig must set _both_ to "n".
-		// Before, LONG_OPTS remained "y".
-		if (input_mode == set_no
-		 || input_mode == set_mod
-		 || input_mode == set_yes
-		) {
-			rootEntry = &rootmenu;
-			conf(&rootmenu);
-		}
 		if (input_mode == ask_all) {
 			input_mode = ask_silent;
 			valid_stdin = 1;
-- 
2.54.0