From owner-svn-src-all@FreeBSD.ORG Mon Mar 8 16:07:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DB0B106564A; Mon, 8 Mar 2010 16:07:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 20BC98FC17; Mon, 8 Mar 2010 16:07:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o28G6ZA1082403; Mon, 8 Mar 2010 09:06:35 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 08 Mar 2010 09:06:59 -0700 (MST) Message-Id: <20100308.090659.460114267457255328.imp@bsdimp.com> To: obrien@freebsd.org From: "M. Warner Losh" In-Reply-To: <20100308010125.GA6387@dragon.NUXI.org> References: <201003071008.o27A80wC014578@svn.freebsd.org> <20100307.143619.510313205755027975.imp@bsdimp.com> <20100308010125.GA6387@dragon.NUXI.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204824 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 16:07:21 -0000 In message: <20100308010125.GA6387@dragon.NUXI.org> "David O'Brien" writes: : On Sun, Mar 07, 2010 at 02:36:19PM -0700, M. Warner Losh wrote: : > Please back out this change. It is unwise, I think. : : Instead I'd rather fix it for the use case you mention. I'd still rather you back it out because it introduces a significant regression in speed, see below... : ---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---- : Index: newvers.sh : =================================================================== : --- newvers.sh (revision 204851) : +++ newvers.sh (working copy) : @@ -87,13 +87,11 @@ touch version : v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date` : i=`${MAKE:-make} -V KERN_IDENT` : : +# Are we doing a kernel build? Look for "/sys/" in pwd for 'make kernel', : +# and "/compile/" for tradiational within-tree kernel build. : case "$d" in : -*/compile/*) : - SRCDIR=${d##*obj} : - if [ -n "$MACHINE" ]; then : - SRCDIR=${SRCDIR##/$MACHINE} : - fi : - SRCDIR=$(cd ${SRCDIR%%/compile/*}/.. && pwd) : +*/sys/*|*/compile/*) : + SRCDIR=$(realpath $(dirname $0)/..) : : for dir in /bin /usr/bin /usr/local/bin; do : if [ -d "${SRCDIR}/.svn" -a -x "${dir}/svnversion" ] ; then : ---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---->%---- : : : Do you get the subversion revision in your vers.c file with this patch? Well, except that you get the revision for the whole tree, instead of just for the kernel. And this takes a *LOT* longer to compute. The whole reason we did the sys hack was to make build times not suck... for dir in /bin /usr/bin /usr/local/bin; do - if [ -d "${SRCDIR}/sys/.svn" -a -x "${dir}/svnversion" ] ; then + if [ -d "${SRCDIR}/.svn" -a -x "${dir}/svnversion" ] ; then svnversion=${dir}/svnversion break fi @@ -107,7 +107,7 @@ case "$d" in done if [ -n "$svnversion" ] ; then - svn=" r`cd ${SRCDIR}/sys && $svnversion`" + svn=" r`cd ${SRCDIR} && $svnversion`" fi if [ -n "$git_cmd" ] ; then git=`$git_cmd rev-parse --verify --short HEAD 2>/dev/null` Again, like Doug said: "my kernel doesn't live in sys" isn't a problem that is worth solving at the cost of "I have to run svnversion over all of /usr/src every time I build a kernel." Please, back this out. If you *MUST* support != sys, then do so in a way that doesn't screw everybody else with long build times. And *PLEASE* talk to people before doing a drive-by commit? This bit of code has way too much loaded history behind it for just random tweaking. Warner