public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Allow kconfig to accept overrides
@ 2007-10-12 21:44 Jan Engelhardt
  2007-10-12 21:49 ` Randy Dunlap
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Jan Engelhardt @ 2007-10-12 21:44 UTC (permalink / raw)
  To: zippel; +Cc: Linux Kernel Mailing List, randy.dunlap, sam


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.

Previously sent:
	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(-)

#
# Applies cleanly to 2.6.22/23/git.
#
Index: linux-2.6.22.1/scripts/kconfig/confdata.c
===================================================================
--- linux-2.6.22.1.orig/scripts/kconfig/confdata.c
+++ linux-2.6.22.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 turns state choice", sym->name);
+				cs->def[def].val = sym;
 				break;
 			}
 			cs->def[def].tri = E_OR(cs->def[def].tri, sym->def[def].tri);


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

end of thread, other threads:[~2007-10-18 13:32 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-12 21:44 [PATCH] Allow kconfig to accept overrides Jan Engelhardt
2007-10-12 21:49 ` Randy Dunlap
2007-10-12 22:10   ` Jan Engelhardt
2007-10-12 22:57 ` Randy Dunlap
2007-10-12 23:29   ` Jan Engelhardt
2007-10-12 23:32     ` Randy Dunlap
2007-10-13  8:16     ` Stefan Richter
2007-10-13 11:39       ` Jan Engelhardt
2007-10-13 14:01         ` Stefan Richter
2007-10-13 14:15           ` Jan Engelhardt
2007-10-13 16:25             ` Randy Dunlap
2007-10-13 16:36               ` Jan Engelhardt
2007-10-18 13:29                 ` Sam Ravnborg
2007-10-18 13:31                   ` Jan Engelhardt
2007-10-16  4:29 ` Sam Ravnborg
2007-10-16  5:14   ` Rob Landley
2007-10-16 14:44   ` Jan Engelhardt

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