/usr/local/bin in $PATH in system scripts?

Ming Hua minghua at ubuntu.com
Fri May 11 03:52:16 UTC 2007


On Thu, May 10, 2007 at 08:33:41PM -0700, Micah Cowan wrote:
> Ming Hua wrote:
> > 
> > For the sake of discussion, I think
> > 
> > #!/usr/bin/env perl
> > 
> > will pick up $PATH and is a valid #! line.  I also believe this is widely
> > used.
> 
> Yes, it will. But isn't that a somewhat silly suggestion considering the
> context? If /usr/bin/perl were "bad" then /usr/bin/env would be just as
> "bad", it seems to me...

That's not the point.

Fergal's argument is, if you think scripts honoring the $PATH variable
and use the binaries /usr/local/bin/ is a feature because it respects
the user preference, you should also think using "#!/usr/bin/env perl"
instead of "#!/usr/bin/perl" a feature as well, for the same reason.
And I think it's a valid argument.

Debian guarantees /usr/bin/perl and /usr/bin/env will work.  I think the
focus of this discussion is what happens if we have a "bad"
/usr/local/bin/perl, not a "bad" /usr/bin/perl.

Ming
2007.05.10




More information about the Ubuntu-devel-discuss mailing list