From owner-freebsd-current@FreeBSD.ORG Fri Jan 6 19:02:39 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 048BC106564A; Fri, 6 Jan 2012 19:02:39 +0000 (UTC) (envelope-from pinter@tresorium.hu) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 63D7B8FC0C; Fri, 6 Jan 2012 19:02:37 +0000 (UTC) Received: by eekc50 with SMTP id c50so1466962eek.13 for ; Fri, 06 Jan 2012 11:02:37 -0800 (PST) Received: by 10.213.31.66 with SMTP id x2mr1427392ebc.60.1325876557140; Fri, 06 Jan 2012 11:02:37 -0800 (PST) Received: from peonia (peonia.teteny.elte.hu. [157.181.96.25]) by mx.google.com with ESMTPS id t1sm251296590eeb.3.2012.01.06.11.02.36 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 06 Jan 2012 11:02:36 -0800 (PST) From: Oliver Pinter Organization: Tresorium Ltd. To: Sergey Kandaurov Date: Fri, 6 Jan 2012 20:02:29 +0100 User-Agent: KMail/1.9.10 References: <201201061850.33863.pinter@tresorium.hu> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201201062002.29775.pinter@tresorium.hu> X-Mailman-Approved-At: Fri, 06 Jan 2012 19:24:23 +0000 Cc: stable@freebsd.org, current@freebsd.org Subject: Re: [RFC] fix git detection code in newvers.sh when svn installed 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: Fri, 06 Jan 2012 19:02:39 -0000 On Friday 06 January 2012 19:35:31 Sergey Kandaurov wrote: > On 6 January 2012 21:50, Oliver Pinter wrote: > > Hi All! > > > > When svn installed and the source stored in git, then now the version > > detection failed. The attached patch fixed this situation. > > FWIW, a different version proposed by Maciej Milewski on -current > some time ago. I don't have/use git, so I cannot test these changes. > It is good in the sense that it doesn't duplicate a search path. > The patch is below for reference: > > --- sys/conf/newvers.sh 2011-11-19 00:56:50.795815738 +0100 > +++ sys/conf/newvers-patched.sh 2011-11-19 00:58:21.187818982 +0100 > @@ -88,14 +88,14 @@ > i=`${MAKE:-make} -V KERN_IDENT` > > for dir in /bin /usr/bin /usr/local/bin; do > - if [ -x "${dir}/svnversion" ] ; then > - svnversion=${dir}/svnversion > - break > - fi > if [ -d "${SYSDIR}/../.git" -a -x "${dir}/git" ] ; then > git_cmd="${dir}/git --git-dir=${SYSDIR}/../.git" > break > fi > + if [ -x "${dir}/svnversion" ] ; then > + svnversion=${dir}/svnversion > + break > + fi > done > > if [ -n "$svnversion" ] ; then The problem with this, when git founded first and the source not stored in git, then the svn version not correctly set, due the loop first found git, and than breaked out. The same situation as my patch fixed, but from svn viewpoint. -- Oliver Pinter (Tresorium)