- kconfig-kconfig_overwriteconfig.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     kconfig: KCONFIG_OVERWRITECONFIG

has been removed from the -mm tree.  Its filename is

     kconfig-kconfig_overwriteconfig.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: kconfig: KCONFIG_OVERWRITECONFIG
From: Roman Zippel <zippel@xxxxxxxxxxxxxx>


If you set KCONFIG_OVERWRITECONFIG in environment, Kconfig will not break
symlinks when .config is a symlink to somewhere else.

Cc: Sam Ravnborg <sam@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 Makefile                   |    6 +++-
 scripts/kconfig/confdata.c |   46 ++++++++++++++++++++++-------------
 scripts/kconfig/lkc.h      |    2 -
 3 files changed, 33 insertions(+), 21 deletions(-)

diff -puN Makefile~kconfig-kconfig_overwriteconfig Makefile
--- Makefile~kconfig-kconfig_overwriteconfig	2006-05-11 15:17:57.000000000 -0700
+++ devel-akpm/Makefile	2006-05-11 15:17:57.000000000 -0700
@@ -178,6 +178,8 @@ CROSS_COMPILE	?=
 # Architecture as present in compile.h
 UTS_MACHINE := $(ARCH)
 
+KCONFIG_CONFIG	?= .config
+
 # SHELL used by kbuild
 CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
 	  else if [ -x /bin/bash ]; then echo /bin/bash; \
@@ -438,13 +440,13 @@ ifeq ($(dot-config),1)
 -include include/config/auto.conf
 
 # To avoid any implicit rule to kick in, define an empty command
-.config include/config/auto.conf.cmd: ;
+$(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
 
 # If .config is newer than include/config/auto.conf, someone tinkered
 # with it and forgot to run make oldconfig.
 # if auto.conf.cmd is missing then we are probarly in a cleaned tree so
 # we execute the config step to be sure to catch updated Kconfig files
-include/config/auto.conf: .config include/config/auto.conf.cmd
+include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
 	$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
 
 else
diff -puN scripts/kconfig/confdata.c~kconfig-kconfig_overwriteconfig scripts/kconfig/confdata.c
--- devel/scripts/kconfig/confdata.c~kconfig-kconfig_overwriteconfig	2006-05-11 15:17:57.000000000 -0700
+++ devel-akpm/scripts/kconfig/confdata.c	2006-05-11 15:17:57.000000000 -0700
@@ -21,8 +21,6 @@ static void conf_warning(const char *fmt
 static const char *conf_filename;
 static int conf_lineno, conf_warnings, conf_unsaved;
 
-const char conf_def_filename[] = ".config";
-
 const char conf_defname[] = "arch/$ARCH/defconfig";
 
 static void conf_warning(const char *fmt, ...)
@@ -36,6 +34,13 @@ static void conf_warning(const char *fmt
 	conf_warnings++;
 }
 
+const char *conf_get_configname(void)
+{
+	char *name = getenv("KCONFIG_CONFIG");
+
+	return name ? name : ".config";
+}
+
 static char *conf_expand_value(const char *in)
 {
 	struct symbol *sym;
@@ -91,7 +96,7 @@ int conf_read_simple(const char *name, i
 	} else {
 		struct property *prop;
 
-		name = conf_def_filename;
+		name = conf_get_configname();
 		in = zconf_fopen(name);
 		if (in)
 			goto load;
@@ -381,7 +386,7 @@ int conf_write(const char *name)
 		if (!stat(name, &st) && S_ISDIR(st.st_mode)) {
 			strcpy(dirname, name);
 			strcat(dirname, "/");
-			basename = conf_def_filename;
+			basename = conf_get_configname();
 		} else if ((slash = strrchr(name, '/'))) {
 			int size = slash - name + 1;
 			memcpy(dirname, name, size);
@@ -389,16 +394,24 @@ int conf_write(const char *name)
 			if (slash[1])
 				basename = slash + 1;
 			else
-				basename = conf_def_filename;
+				basename = conf_get_configname();
 		} else
 			basename = name;
 	} else
-		basename = conf_def_filename;
+		basename = conf_get_configname();
 
-	sprintf(newname, "%s.tmpconfig.%d", dirname, (int)getpid());
-	out = fopen(newname, "w");
+	sprintf(newname, "%s%s", dirname, basename);
+	env = getenv("KCONFIG_OVERWRITECONFIG");
+	if (!env || !*env) {
+		sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
+		out = fopen(tmpname, "w");
+	} else {
+		*tmpname = 0;
+		out = fopen(newname, "w");
+	}
 	if (!out)
 		return 1;
+
 	sym = sym_lookup("KERNELVERSION", 0);
 	sym_calc_value(sym);
 	time(&now);
@@ -498,19 +511,18 @@ int conf_write(const char *name)
 		}
 	}
 	fclose(out);
-	if (!name || basename != conf_def_filename) {
-		if (!name)
-			name = conf_def_filename;
-		sprintf(tmpname, "%s.old", name);
-		rename(name, tmpname);
+
+	if (*tmpname) {
+		strcat(dirname, name ? name : conf_get_configname());
+		strcat(dirname, ".old");
+		rename(newname, dirname);
+		if (rename(tmpname, newname))
+			return 1;
 	}
-	sprintf(tmpname, "%s%s", dirname, basename);
-	if (rename(newname, tmpname))
-		return 1;
 
 	printf(_("#\n"
 		 "# configuration written to %s\n"
-		 "#\n"), tmpname);
+		 "#\n"), newname);
 
 	sym_change_count = 0;
 
diff -puN scripts/kconfig/lkc.h~kconfig-kconfig_overwriteconfig scripts/kconfig/lkc.h
--- devel/scripts/kconfig/lkc.h~kconfig-kconfig_overwriteconfig	2006-05-11 15:17:57.000000000 -0700
+++ devel-akpm/scripts/kconfig/lkc.h	2006-05-11 15:17:57.000000000 -0700
@@ -64,8 +64,6 @@ int zconf_lineno(void);
 char *zconf_curname(void);
 
 /* confdata.c */
-extern const char conf_def_filename[];
-
 char *conf_get_default_confname(void);
 
 /* kconfig_load.c */
_

Patches currently in -mm which might be from zippel@xxxxxxxxxxxxxx are

git-kbuild.patch
m68k-completely-initialize-hw_regs_t-in-ide_setup_ports.patch
m68k-atyfb_base-compile-fix-for-config_pci=n.patch
m68k-cleanup-unistdh.patch
m68k-remove-some-unused-definitions-in-zorroh.patch
m68k-use-c99-initializer.patch
m68k-print-correct-stack-trace.patch
m68k-restore-amikbd-compatibility-with-24.patch
m68k-extra-delay.patch
m68k-use-proper-defines-for-zone-initialization.patch
m68k-adjust-to-changed-hardirq_mask.patch
m68k-m68k-mac-via2-fixes-and-cleanups.patch
m68k-clean-up-uaccessh.patch
fix-incorrect-sa_onstack-behaviour-for-64-bit-processes.patch
adjust-handle_irr_event-return-type.patch
time-use-clocksource-abstraction-for-ntp-adjustments-optimize-out-some-mults-since-gcc-cant-avoid-them.patch
time-rename-clocksource-functions.patch
fix-rt-mutex-defaults-and-dependencies.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux