Am 12.01.2015 um 23:23 schröbte Andrew Starks:
>
> It appears that there are many places where paths are generated and
> saved as literal values and that this is done on purpose. It's not
> what I would have expected and it prompted me to toss out a hasty
> email. :)

First we use the absolute path to the Lua interpreter which the 
installation/configure script detected. This helps in case someone has 
multiple Lua versions installed side-by-side. Second we add the rocks 
tree to the search paths, so that the dependencies installed via 
LuaRocks can be found before any other modules installed on the system, 
and no incompatible module versions are used. We use the `-e` command 
line switch for that instead of `LUA_PATH` because the environment 
variables could be inherited by processes spawned in the Lua script. 
This is particularly deadly if you `os.execute` a Lua 5.2 interpreter 
from a Lua 5.1 script, because Lua 5.2 will happily use the LUA_CPATH 
intended for the Lua 5.1 script. Third, the path to the internal 
LuaRocks modules is added using the same mechanism, so that 
`luarocks.loader` can be `require`'d. And finally, `luarocks.loader` is 
passed the information it needs to select the correct versions for the 
dependencies specified in the rockspec in case multiple versions of such 
a module are installed.

>
> -Andrew

Philipp




------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to