[CFT] [sys/conf/newvers.sh] Cleanup and additions.

Anonymous swell.k at gmail.com
Wed Aug 11 02:06:11 UTC 2010


jhell <jhell at dataix.net> writes:

> On 08/10/2010 19:32, Anonymous wrote:
>> jhell <jhell at dataix.net> writes:
>> 
>>>  * Adjust the paths that are checked for binaries to be of only
>>> /usr/local/bin and /usr/bin. "/bin" is highly unlikely to hold svn(1),
>>> git(1) or hg(1).
>> 
>> Please, look at conf/146828. That script shouldn't blindly assume where
>> user installs his packages[1].
>> 
>> [1] using non-default LOCALBASE is a convenient way to identify
>>     non-conforming ports
>> 
>
> And that would be to identify non-conforming ports using non-standard
> locations. Though the option is available to look in a non-standard

You're confusing default and standard value. LOCALBASE has a default for
/usr/local. If it were a standard one wouldn't care about it and just
hardcode /usr/local everywhere.

> location for binaries, IMHO it does not belong here and I don't find
> that right for building world. I also find this method a little hard to
> adjust for targeting specific locations, for example if the base system
> finally had a svnversion(1) installed and we prefered that over use of a
> local installed port. Currently I can just subtract that path from any
> one of the given SCM's configured to work with this patch without
> effecting the others.

Hmm, then just put LOCALBASE *after* /usr/bin in PATH.

  $ where grep
  /usr/local/bin/grep
  /usr/bin/grep
  $ find-bin grep
  $ echo $grep
  /usr/bin/grep

I don't think there is a need to cater ambiguity, i.e. having different
defaults for different programs.

>
> I have had another idea along the likes of this but just throwing an
> entry point hook in that checks for the existence of a user built or
> supplied file if you will so newvers.sh can keep doing what it has been
> doing for all these years without the interruption for small changes
> like the ones were talking about now. If people are interested in
> something like this I would be more than happy to oblige and provide a
> patch to do just that.

While hook is a good idea without working examples for popular VCSes
it'll not be very useful. One could add a script that tries to
binary-search for a svn revision based on cvsup checkout, too.


More information about the freebsd-current mailing list