Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Apr 2016 08:25:55 -0400
From:      Steve Wills <swills@FreeBSD.org>
To:        Peter Jeremy <peter@rulingia.com>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r297902 - head
Message-ID:  <570E3AD3.30309@FreeBSD.org>
In-Reply-To: <20160413081242.GA10478@server.rulingia.com>
References:  <201604130147.u3D1l5F0032629@repo.freebsd.org> <20160413081242.GA10478@server.rulingia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 04/13/16 04:12 AM, Peter Jeremy wrote:
> On 2016-Apr-13 01:47:05 +0000, Steve Wills <swills@FreeBSD.org> wrote:
>> +.if !defined(SVN) || empty(SVN)
>> +. for _P in /usr/bin /usr/local/bin
>> +.  for _S in svn svnlite
>> +.   if exists(${_P}/${_S})
>> +SVN=   ${_P}/${_S}
>> +.   endif
>> +.  endfor
>> +. endfor
>> +.endif
> 
> What is the preferred choice here?  The given order prefers ports over base
> (which makes sense) but then prefers svnlite over svn.  I would expect
> either the opposite directory order in _P (prefer svnlite in base) or the
> opposite command order in _S (prefer svn in ports).
> 
> In normal use, this will wind up with either /usr/local/bin/svn or
> /usr/bin/svnlite (in that order) but a non-standard configuration could
> result in different results.
> 

You also end up with /usr/bin/svn if WITH_SVN is set (in which case
/usr/bin/svnlite wouldn't exist). There wouldn't be a
/usr/local/bin/svnlite, at least normally.

The preference would be for /usr/local/bin/svn over /usr/bin/svn* (user
went out of their way to make this exist, they must want to use it).
Then for whichever of /usr/bin/svnlite or /usr/bin/svn exists.

This isn't to say that one is better than another. The goal here was
just to try harder to find it out of the box.

Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?570E3AD3.30309>