tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Denying #!/usr/bin/env as a valid interpreter

On Sun, 17 Apr 2011 15:18:23 +0900, J?rn Clausen 
<> wrote:

On Sat, Apr 16, 2011 at 10:24 PM, Roy Marples <> 
Each time I upgrade pkgsrc, I get annoyed by developer laziness to check
any new files for a valid python interpreter. This is because

#!/usr/bin/env python

Is the recommended way of calling python by upstream and allows it just because /usr/bin/env exists.
Sadly, no binary called python exists on pkgsrc - it's python2.6 for

Isn't pkgsrc to blame by not providing a binary called "python"? The
/usr/bin/env approach is IMHO a valid method. It has it's drawbacks
and in certain situations I would avoid it, in others I would strongly
prefer it.

Do you know there is no /usr/bin/env for some platforms?
It may be /bin/env, or /sbin/env, or something else.

How about on platforms with multiple `python' commands?

How about providing a link "python -> python26" for the default
version (as defined by PYTHON_VERSION_DEFAULT)? The same goes for e.g.
Java. Why is java not called "java", but e.g. "sun6-java"? It would
make things much easier to have a default version available under the
name "java". You could still have other versions installed under their
original names.

You can install pkgtools/pkg_alternatives.
But it will create shell script wrapper, so you cannot use it in shebang.

OBATA Akio /

Home | Main Index | Thread Index | Old Index