On 7 Apr 2013, at 11:59, Hisham <h...@hisham.hm> wrote: > Hi all, Hi Hisham,
> I'm working on improving support to run LuaRocks with Lua 5.1 and 5.2 > on the same machine. Excellent! > Right now I'm thinking that supporting two installs of LuaRocks in the > same machine is the cleanest approach, since the sources should be > either in share/lua/5.1/luarocks/ or share/lua/5.2/luarocks/. Having > both install means that each would have its own properly configured > site_config.lua. I don't think warping things around just to save > <500kiB worth of .lua files is worth it. And yet I have made perfectly functional triple-interpreter installs of luarocks on Ubuntu and Mountain Lion, each managing three independent trees (Lua 5.1.x, Lua 5.2.x and luajit-2.0.x) all with just a single installation of luarocks-2.0.12. This was following your earlier instructions to create a config.lua for each and then installing a wrapper script that sets LUAROCKS_CONFIG according to the value of LUA or the version of the first lua binary on the command search PATH. > Then it's a matter of solving the other clashes: > > * the luarocks and luarocks-admin bin entries would use names such as > luarocks-5.1, with a symlink 'luarocks -> luarocks-5.1' (or 5.2, > whatever is installed last) > * LuaRocks will look for config-5.1.lua or config-5.2.lua > * likewise, lib/luarocks/rocks will be versioned (probably as > lib/luarocks/rocks/5.1 and lib/luarocks/rocks/5.2) > > The idea is that two consecutive installations, one with './configure > --with-lua-version=5.1; make; sudo make install' and then another with > './configure --with-lua-version=5.2; make; sudo make install' would > do the right thing. > > Is that too cumbersome? It seems like unnecessary complication, especially for distro packagers, who will have to juggle several installations of essentially the same package to match each associated Lua interpreter. I would much prefer to have a single luarocks package installed by my package manager, and ideally to be able to install additional supported luarocks-config.lua files as luarocks. For example: brew install lua brew install luarocks brew install luajit luarocks install config-luajit-2.0 brew tap homebrew/versions brew install lua52 luarocks install config-5.2 (this doesn't work yet, but is what I plan to provide with my next round of homebrew lua package pull-requests. Obviously I need to beef up my own luarocks wrapper script as part of this, but I'd be very happy to share and make multi-tree luarocks clean and easy with apt-get/rpm based packaging too). > I also initially thought about adding extra checks for backward > compatibility with unversioned names (config.lua and > lib/luarocks/rocks) but now I think it will bring more confusion than > convenience, especially in the case of two parallel installs, one > using the original names and another using the new names. It should be > possible to convert a local tree to the new names by moving a few > files around (no rebuild of installed rocks should be necessary). Agreed. Cheers, -- Gary V. Vaughan (gary AT vaughan DOT pe) ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ Luarocks-developers mailing list Luarocks-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/luarocks-developers