Re: [PATCH] Allow kconfig to accept overrides

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jan Engelhardt
Date: Thursday, October 18, 2007 - 6:31 am

On Oct 18 2007 15:29, Sam Ravnborg wrote:

===
Allow config variables in .config to override earlier ones in the same
file. In other words,

	# CONFIG_SECURITY is not defined
	CONFIG_SECURITY=y

will activate it. This makes it a bit easier to do

	(cat original-config myconfig myconfig2 ... >.config)

and run menuconfig as expected.

Posted at:
	http://lkml.org/lkml/2006/10/25/81
	http://lkml.org/lkml/2007/4/1/175

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>

---
 scripts/kconfig/confdata.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

Index: linux-2.6.23.1/scripts/kconfig/confdata.c
===================================================================
--- linux-2.6.23.1.orig/scripts/kconfig/confdata.c
+++ linux-2.6.23.1/scripts/kconfig/confdata.c
@@ -170,8 +170,7 @@ load:
 					sym->type = S_BOOLEAN;
 			}
 			if (sym->flags & def_flags) {
-				conf_warning("trying to reassign symbol %s", sym->name);
-				break;
+				conf_warning("override: reassigning to symbol %s", sym->name);
 			}
 			switch (sym->type) {
 			case S_BOOLEAN:
@@ -210,8 +209,7 @@ load:
 					sym->type = S_OTHER;
 			}
 			if (sym->flags & def_flags) {
-				conf_warning("trying to reassign symbol %s", sym->name);
-				break;
+				conf_warning("override: reassigning to symbol %s", sym->name);
 			}
 			switch (sym->type) {
 			case S_TRISTATE:
@@ -288,11 +286,9 @@ load:
 				}
 				break;
 			case yes:
-				if (cs->def[def].tri != no) {
-					conf_warning("%s creates inconsistent choice state", sym->name);
-					cs->flags &= ~def_flags;
-				} else
-					cs->def[def].val = sym;
+				if(cs->def[def].tri != no)
+					conf_warning("override: %s changes choice state", sym->name);
+				cs->def[def].val = sym;
 				break;
 			}
 			cs->def[def].tri = E_OR(cs->def[def].tri, sym->def[def].tri);
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Allow kconfig to accept overrides, Jan Engelhardt, (Fri Oct 12, 2:44 pm)
Re: [PATCH] Allow kconfig to accept overrides, Randy Dunlap, (Fri Oct 12, 2:49 pm)
Re: [PATCH] Allow kconfig to accept overrides, Jan Engelhardt, (Fri Oct 12, 3:10 pm)
Re: [PATCH] Allow kconfig to accept overrides, Randy Dunlap, (Fri Oct 12, 3:57 pm)
Re: [PATCH] Allow kconfig to accept overrides, Jan Engelhardt, (Fri Oct 12, 4:29 pm)
Re: [PATCH] Allow kconfig to accept overrides, Randy Dunlap, (Fri Oct 12, 4:32 pm)
Re: [PATCH] Allow kconfig to accept overrides, Stefan Richter, (Sat Oct 13, 1:16 am)
Re: [PATCH] Allow kconfig to accept overrides, Jan Engelhardt, (Sat Oct 13, 4:39 am)
Re: [PATCH] Allow kconfig to accept overrides, Stefan Richter, (Sat Oct 13, 7:01 am)
Re: [PATCH] Allow kconfig to accept overrides, Jan Engelhardt, (Sat Oct 13, 7:15 am)
Re: [PATCH] Allow kconfig to accept overrides, Randy Dunlap, (Sat Oct 13, 9:25 am)
Re: [PATCH] Allow kconfig to accept overrides, Jan Engelhardt, (Sat Oct 13, 9:36 am)
Re: [PATCH] Allow kconfig to accept overrides, Sam Ravnborg, (Mon Oct 15, 9:29 pm)
Re: [PATCH] Allow kconfig to accept overrides, Rob Landley, (Mon Oct 15, 10:14 pm)
Re: [PATCH] Allow kconfig to accept overrides, Jan Engelhardt, (Tue Oct 16, 7:44 am)
Re: [PATCH] Allow kconfig to accept overrides, Sam Ravnborg, (Thu Oct 18, 6:29 am)
Re: [PATCH] Allow kconfig to accept overrides, Jan Engelhardt, (Thu Oct 18, 6:31 am)