[haiku-development] Re: usr/bin

  • From: Donn Cave <donn@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 28 Apr 2009 07:31:09 -0700 (PDT)

Quoth "=?utf-8?q?Fran=C3=A7ois?= Revol" <revol@xxxxxxx>,
...
> Btw, this /usr/bin/env is a stupid trick to locate other binaries, like
> #!/usr/bin/env python
> instead of 
> #!/usr/bin/python
>
> Which just moves the problem around, and doesn't fix the issue at all.

Well, it does fix it.  It's nothing personal with me, I don't use
"env" anyway, and it isn't a perfect solution, but it does allow
simple scripts to run unmodified in UNIX environments with gratuitous
differences in their directory organization, without the need to
invent some ad hoc pre-processor.

If you feel reasonably confident that these scripts will be broken
on Haiku anyway, then fine, you don't need env, but of course there's
no point in putting it in "/bin" (that quintessential UNIX directory
that clearly exists for the sake of 1000 UNIX shell scripts that depend
on "/bin/sh"), it has to be /usr/bin/env to serve its purpose.  And
it isn't obvious that you can expect much from "porting" these
applications whose scripts don't account for the one otherwise UNIX
like platform that doesn't support it.  It's one thing to add an
#if defined(__HAIKU__) to a C program and return that patch to the
maintainer, but a build procedure to edit a script that has up to
now been able to run unmodified is going to be a little less welcome.

Like I say, I don't even use it, and I don't have any reason to
think it's actually a problem, but there's no harm in appreciating
that it may have some potential value.

        Donn


Other related posts: