From owner-freebsd-current@FreeBSD.ORG Thu Aug 13 18:57:22 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32B05106566B for ; Thu, 13 Aug 2009 18:57:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id D27478FC57 for ; Thu, 13 Aug 2009 18:57:21 +0000 (UTC) Received: (qmail 27876 invoked by uid 399); 13 Aug 2009 18:57:16 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 13 Aug 2009 18:57:16 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A846206.7010803@FreeBSD.org> Date: Thu, 13 Aug 2009 11:57:10 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.22 (X11/20090729) MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <200903282317.n2SNHIjI015202@svn.freebsd.org> In-Reply-To: <200903282317.n2SNHIjI015202@svn.freebsd.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: svn commit: r190514 - head/sys/conf X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 18:57:22 -0000 Bjoern A. Zeeb wrote: > Author: bz > Date: Sat Mar 28 23:17:18 2009 > New Revision: 190514 > URL: http://svn.freebsd.org/changeset/base/190514 > > Log: > For kernel builds reduce the impact of svnversion, just scanning > src/sys and not the entire src/ tree. > > An earlier solution by peter had been comitted in r183528 and backed out > in r183566 due to problems with newvers.sh also called from other places > during world build. With the extra test this survived a make universe. > > Modified: > head/sys/conf/newvers.sh > > Modified: head/sys/conf/newvers.sh > ============================================================================== > --- head/sys/conf/newvers.sh Sat Mar 28 21:06:59 2009 (r190513) > +++ head/sys/conf/newvers.sh Sat Mar 28 23:17:18 2009 (r190514) > @@ -100,7 +100,13 @@ for dir in /bin /usr/bin /usr/local/bin; > done > > if [ -n "$svnversion" -a -d "${SRCDIR}/.svn" ] ; then > - svn=" r`cd $SRCDIR && $svnversion`" > + # If we are called from the kernel build, limit > + # the scope of svnversion to sys/ . > + if [ -e "${SRCDIR}/sys/conf/newvers.sh" ] ; then I missed this when it went through originally, so my apologies for the late response, but I don't see any way that this first test can ever not be true. Is there a better way to detect if the script is called in the buildkernel process? Also, what problem are we really trying to solve here? With a populated cache it takes on average 5 seconds to run all of src, and just under 1 to do only sys. Is 4 seconds really that important to save? With a dry cache I'm sure it takes a little longer, but has anyone actually measured this? Doug > + svn=" r`cd $SRCDIR/sys && $svnversion`" > + else > + svn=" r`cd $SRCDIR && $svnversion`" > + fi > else > svn="" > fi > -- This .signature sanitized for your protection