[Luarocks-developers] patch for luarocks path and comments
Brought to you by:
loderunner
|
From: David M. <dm...@ma...> - 2011-09-10 17:29:56
|
Here's a patch:
--- a/src/luarocks/path.lua
+++ b/src/luarocks/path.lua
@@ -309,7 +309,7 @@ end
-- @return boolean This function always succeeds.
function run(...)
util.printout(cfg.export_lua_path:format(package.path))
- util.printout(cfg.export_lua_cpath:format(package.path))
+ util.printout(cfg.export_lua_cpath:format(package.cpath))
return true
end
I experienced the problem on doing this:
$ eval `./luarocks path`
$ lua -lmd5
lua: error loading module 'md5.core' from file
'/home/username/luarocks//share/lua/5.1//md5.lua':
/home/username/luarocks//share/lua/5.1//md5.lua: invalid ELF header
BTW, I think there should be some comment about "luarocks path" and
also "eval `./luarocks path`" printed at the end of `make install`.
The instructions [1] don't even mention "luarocks path" either. I
needed to do some digging on both of these. I think it would also be
nice to have some simple ways to setup the paths from within Lua; for
example:
$ lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> dofile '~/luarocks/etc/luarocks/initialize.lua`
> require 'md5'
$ LUA_INIT=@~/luarocks/etc/luarocks/initialize.lua lua -lmd5
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
>
[1] http://luarocks.org/en/Installation_instructions_for_Unix
|