Re: PATH: /usr/local before or after /usr ?

From: Willem Jan Withagen via freebsd-current <freebsd-current_at_freebsd.org>
Date: Sun, 15 Aug 2021 12:32:05 UTC
On 16-7-2021 18:46, Ian Lepore wrote:
> On Fri, 2021-07-16 at 09:01 -0600, Alan Somers wrote:
>> FreeBSD has always placed /usr/local/X after /usr/X in the default PATH.
>> AFAICT that convention began with SVN revision 37 "Initial import of 386BSD
>> 0.1 othersrc/etc".  Why is that?  It would make sense to me that
>> /usr/local/X should come first.  That way programs installed from ports can
>> override FreeBSD's defaults.  Is there a good reason for this convention,
>> or is it just inertia?
>> -Alan
> I have a hierarchy on my machines rooted at /local and /local/bin is
> before /bin and /usr/bin in my PATH, so I can override system tools
> when I explicitly want to without suffering any problems of an
> unexpected override from installing a port or package.
>
> If you're using ports as a development environment to work on a new
> gstat replacement, you could do something similar and put PREFIX=/local
> in your port makefile while you're developing on it.
+1

Cannot recall running into any issues over a long time.
I'm only annoyed by having to fix access to installed ports when this 
reorder
is not done...

Perhaps just don't do this for root?

--WjW