Date: Fri, 16 Jul 2021 11:11:58 -0600 From: Alan Somers <asomers@freebsd.org> To: Ian Lepore <ian@freebsd.org> Cc: FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Re: PATH: /usr/local before or after /usr ? Message-ID: <CAOtMX2j1JQRrN=R7LtApLhCbEBpOH-P1-Hnzs=Um8UyCR7HOkg@mail.gmail.com> In-Reply-To: <662dbcebb38135deb1599cd9d8fee3e133330409.camel@freebsd.org> References: <CAOtMX2g3G0nFCXGoWo14d1iwOisBUBAom6=v_gTHfJOoT3mJdw@mail.gmail.com> <662dbcebb38135deb1599cd9d8fee3e133330409.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000001486b405c740b0cb Content-Type: text/plain; charset="UTF-8" On Fri, Jul 16, 2021 at 10:46 AM Ian Lepore <ian@freebsd.org> 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. > > -- Ian > Thanks for the feedback everyone. Here's what I'm going to do: * If you install it from cargo, it will go into ~/.cargo/bin/gstat, which (for cargo users) comes first in PATH * If you install it from ports, it will become /usr/local/sbin/gstat-rs, with a pkg-message advising you to setup an alias. -Alan --0000000000001486b405c740b0cb--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2j1JQRrN=R7LtApLhCbEBpOH-P1-Hnzs=Um8UyCR7HOkg>