From owner-freebsd-current@FreeBSD.ORG Sat Nov 19 00:21:09 2011 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 4EDB21065677; Sat, 19 Nov 2011 00:21:09 +0000 (UTC) (envelope-from milu@dat.pl) Received: from jab.dat.pl (dat.pl [80.51.155.34]) by mx1.freebsd.org (Postfix) with ESMTP id 086158FC16; Sat, 19 Nov 2011 00:21:08 +0000 (UTC) Received: from jab.dat.pl (jsrv.dat.pl [127.0.0.1]) by jab.dat.pl (Postfix) with ESMTP id D008885; Sat, 19 Nov 2011 01:04:51 +0100 (CET) X-Virus-Scanned: amavisd-new at dat.pl Received: from jab.dat.pl ([127.0.0.1]) by jab.dat.pl (jab.dat.pl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 2m_MzGP7aFzt; Sat, 19 Nov 2011 01:04:48 +0100 (CET) Received: from snifi.laptop (178-36-161-135.adsl.inetia.pl [178.36.161.135]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by jab.dat.pl (Postfix) with ESMTPSA id 9E47C84; Sat, 19 Nov 2011 01:04:48 +0100 (CET) Message-ID: <4EC6F2B9.70107@dat.pl> Date: Sat, 19 Nov 2011 01:05:13 +0100 From: Maciej Milewski User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111118 Thunderbird/8.0 MIME-Version: 1.0 To: Doug Barton , freebsd-current@freebsd.org Content-Type: multipart/mixed; boundary="------------070500010802070004020009" X-Mailman-Approved-At: Sat, 19 Nov 2011 02:46:56 +0000 Cc: Subject: sys/conf/newvers.sh broken for work with git 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: Sat, 19 Nov 2011 00:21:09 -0000 This is a multi-part message in MIME format. --------------070500010802070004020009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I encountered newvers.sh issue while working locally with git tree. The last patch broke correct versioning. The issue is the "break" after checking the svnversion cmd. I use git for local work and have svnversion cmd too. So the first check is true and break makes exit from further processing for loop. This way there is no check if git is in path. Quick hack would be changing the order of this "if" to first check if there is .git dir and git cmd and then go further to check svnversion. This solution might be not perfect but atleast is working for me. Greetings, Maciek Quick patch is attached. --------------070500010802070004020009 Content-Type: text/plain; name="git-newvers.sh.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="git-newvers.sh.patch" --- 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 --------------070500010802070004020009--