Re: Draft to prohibit use of #!/usr/bin/env

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

 



On 07/19/2009 05:11 AM, Jonathan Underwood wrote:
> 2009/7/17 Toshio Kuratomi <a.badger@xxxxxxxxx>:
>> 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

Attachment: signature.asc
Description: OpenPGP digital signature

--
Fedora-packaging mailing list
Fedora-packaging@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux