keplerproject/luarocks — pull request #98 by rrthomas (2012-09-25 22:38:39+00:00)
Title: Improve support for parallel rocks trees with different Lua versions

Add support for LUAROCKS_SYSCONFIG_X_Y and LUAROCKS_CONFIG_X_Y,
similar to LUA_PATH_5_2, but for any verison of Lua.

Allow repository paths to contain extra components under
"lib/luarocks", so for example you can have "lib/luarocks/5.1/rocks"
and "lib/luarocks/5.2/rocks".

If you're happy with this, I'll document it in the wiki.

The change to the root_dir function is conservative, but unless I misunderstood the code, it seems better to use cfg.root instead of root_dir (cfg.rocks_dir), although this would need another function, like deploy_*_dir, to treat root when it's a table or a string. This would leave only one caller of root_dir, which is do_pack_binary_rock.