From: "Randy.Dunlap" Newsgroups: linux.kernel Subject: Re: [PATCH] save kernel version in .config file Date: Sat, 19 Jun 2004 07:20:06 +0200 Message-ID: <28GqO-9Y-3@gated-at.bofh.it> References: <28jXg-7Hw-3@gated-at.bofh.it> <28kqi-7ZH-5@gated-at.bofh.it> <28yD9-2Ew-47@gated-at.bofh.it> <28A26-3Nd-5@gated-at.bofh.it> <28FuJ-7Ts-5@gated-at.bofh.it> X-Original-To: Willy Tarreau Organization: OSDL X-Mailer: Sylpheed version 0.9.8a (GTK+ 1.2.10; i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: robomod@news.nic.it X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 64 X-Original-Cc: sam@ravnborg.org, linux-kernel@vger.kernel.org X-Original-Date: Fri, 18 Jun 2004 22:02:53 -0700 X-Original-Message-ID: <20040618220253.6a7577f4.rddunlap@osdl.org> X-Original-References: <20040617220651.0ceafa91.rddunlap@osdl.org> <20040618053455.GF29808@alpha.home.local> <20040618205602.GC4441@mars.ravnborg.org> <20040618150535.6a421bdb.rddunlap@osdl.org> <20040619040717.GA32209@alpha.home.local> X-Original-Sender: linux-kernel-owner@vger.kernel.org On Sat, 19 Jun 2004 06:07:17 +0200 Willy Tarreau wrote: | On Fri, Jun 18, 2004 at 03:05:35PM -0700, Randy.Dunlap wrote: | | > OK, I've added date, based on Sam's comments, but someone tell me, | > when/why does filesystem-timestamp not work for this? | | Oh, there may be lots of reasons. The first one which comes to my mind is | when I archive several config files in a same directory, I rarely think | about adding '-a' to cp to preserve the dates. And when you're experimenting | with a kernel and you're at the 20th at the end of the day, the date in the | config file is often more reliable than yourself to keep track of what you | have tried. I see. | Thanks, | Willy | | PS: do you think this could be done easily to 2.4 too ? It's trivial for 'make menuconfig' (bash scripting) [below]. OTOH, I won't look at the tcl/tk 'xconfig' stuff... -- ~Randy linux-2.4.26 Save kernel version and config file date in config file. diffstat:= scripts/Menuconfig | 5 +++++ 1 files changed, 5 insertions(+) diff -Naurp ./scripts/Menuconfig~config_version ./scripts/Menuconfig --- ./scripts/Menuconfig~config_version 2002-08-02 17:39:46.000000000 -0700 +++ ./scripts/Menuconfig 2004-06-18 21:57:47.000000000 -0700 @@ -1275,13 +1275,18 @@ save_configuration () { CONFIG=.tmpconfig CONFIG_H=.tmpconfig.h + DATTIM=`date` echo "#" >$CONFIG echo "# Automatically generated by make menuconfig: don't edit" >>$CONFIG + echo "# Linux kernel version: $kernel_version" >>$CONFIG + echo "# $DATTIM" >>$CONFIG echo "#" >>$CONFIG echo "/*" >$CONFIG_H echo " * Automatically generated by make menuconfig: don't edit" >>$CONFIG_H + echo " * Linux kernel version: $kernel_version" >>$CONFIG_H + echo " * $DATTIM" >>$CONFIG_H echo " */" >>$CONFIG_H echo "#define AUTOCONF_INCLUDED" >> $CONFIG_H - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/