From owner-freebsd-current@FreeBSD.ORG Tue Oct 25 20:07:50 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id D7175106564A for ; Tue, 25 Oct 2011 20:07:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 8D6AE2008B7; Tue, 25 Oct 2011 20:07:47 +0000 (UTC) Message-ID: <4EA71713.3020404@FreeBSD.org> Date: Tue, 25 Oct 2011 13:07:47 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Craig Rodrigues References: <20111020114844.GK59810@albert.catwhisker.org> <20111020122121.GL59810@albert.catwhisker.org> <201110211636.05917.jhb@freebsd.org> <20111025140000.GA8559@albert.catwhisker.org> In-Reply-To: X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: multipart/mixed; boundary="------------090502000102020509020606" Cc: freebsd-current@freebsd.org Subject: Re: sys/conf/newvers.sh vs. subversion-1.7 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: Tue, 25 Oct 2011 20:07:50 -0000 This is a multi-part message in MIME format. --------------090502000102020509020606 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 10/25/2011 12:43, Craig Rodrigues wrote: > I know that Doug disagreed with me on this, I didn't "disagree" with you. I pointed out that there is absolutely no reason to run 2 separate commands. To put it more bluntly, I pointed out why your suggestion is a bad idea. I'm sorry to be so blunt but I'm getting really tired of people who can't let go of bad ideas even when it's demonstrated conclusively why they are bad. :) > The alternative would be to run ${dir}/svnversion, and check the output > of that command, making sure that the output starts with a number. The attached implements that, and is almost certainly the right way to go. It would be nice if someone could test it, and better if someone else could commit it. I swore after the last time that I'd stay away from that file precisely because of all the bikeshed stupidity that this issue creates. Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ --------------090502000102020509020606 Content-Type: text/plain; name="newvers.sh.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="newvers.sh.diff" Index: newvers.sh =================================================================== --- newvers.sh (revision 226474) +++ newvers.sh (working copy) @@ -88,7 +88,7 @@ i=`${MAKE:-make} -V KERN_IDENT` for dir in /bin /usr/bin /usr/local/bin; do - if [ -d "${SYSDIR}/.svn" -a -x "${dir}/svnversion" ] ; then + if [ -x "${dir}/svnversion" ] ; then svnversion=${dir}/svnversion break fi @@ -99,8 +99,12 @@ done if [ -n "$svnversion" ] ; then - echo "$svnversion" - svn=" r`cd ${SYSDIR} && $svnversion`" + echo "$svnversion" + svn=`cd ${SYSDIR} && $svnversion` + case "$svn" in + [0-9]*) svn=" r${svn}" ;; + *) unset svn ;; + esac fi if [ -n "$git_cmd" ] ; then --------------090502000102020509020606--