On 07/19/2009 05:11 AM, Jonathan Underwood wrote:
2009/7/17 Toshio Kuratomi <a.badger(a)gmail.com>:
>
https://fedoraproject.org/wiki/Script_Interpreters_(draft)
>
> I've just submitted this draft. This seems to support the following
This part:
"Also, RPM does dependency additions based on script interpreter
lines. If a script has #! /usr/bin/env python, the dependency added to
the resulting rpm is on /usr/bin/env, not on the actual python
interpreter. This may lead to incorrect dependencies, and broken
scripts."
really sounds like something that could/should be fixed up in rpm
automatic dependency generator(s).
It's not easy to fix 100% correctly, though.
#!/usr/bin/myinterp Argument
Rpm can put a dependency on the file /usr/bin/myinterp. Pretty easy.
#!/usr/bin/env myinterp
Rpm can put a dependency on /usr/bin/env. Then it has to have a special
case for /usr/bin/env that says look at the next argument and treat that
as a dependency also. Then it has to resolve what myinterp is. The big
thing there is that there's no guarantee that the building host has
myinterp installed. Many scripting languages are fine if you use
install (or cp) to install the script to the proper directory and don't
need to have the interpreter installed until runtime.
-Toshio