[haiku-development] Re: RFC: /usr symlink?

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Fri, 11 Oct 2013 19:27:52 -0400

On Fri, Oct 11, 2013 at 3:57 PM, Ryan Leavengood <leavengood@xxxxxxxxx> wrote:
> On Fri, Oct 11, 2013 at 3:28 PM,  <pete.goodeve@xxxxxxxxxxxx> wrote:
>>
>> Hacking the runtime_loader to translate that specific path is an
>> alternative, I suppose, but I really can't see why that's preferable
>> to the simple link.
>
> We probably agree that a simple link is better, but Oliver has gone
> ahead and implemented the runtime_loader fix as of hrev46213:
>
> http://cgit.haiku-os.org/haiku/commit/?id=8b089927996b3d4c3228cf357e0c362aa9ebb1a6
>
> So at least the problem is solved and we can stop complaining ;)

I hope to convince you that this solution inadequately fixes the
problem. Please read the first answer to the question linked below
about when to use #!/usr/bin/python and when to use #!/usr/bin/env
python on Unix Stack Exchange:

http://unix.stackexchange.com/questions/29608/why-is-it-better-to-use-usr-bin-env-name-instead-of-path-to-name-as-my

As the linked answer indicates, both #!/usr/bin/python and
#!/usr/bin/env python are valid in different cases, at least on *nix
systems. If we would like to have cross-platform scrips work on Haiku
then we should revert the runtime_loader code and simply add a symlink
from /usr/ to /boot/system/.

I realize that adding a symlink to /usr/ has some downsides, it adds
yet another Unix wart to the root directory but the benefits, as
outlined above, are worth the cost IMHO.

Also, because the symlink is located in the root directory its
ugliness is ameliorated by the fact that it won't appear in Tracker. I
don't know about you, but, I expect my root directory to look ugly in
Terminal, (it already does anyway) so I'm okay with that.

The other argument against adding a symlink from /usr/ to /boot/system
is that it isn't the Haiku Way™, and I admit I can't really argue with
that.

Other related posts: