From 517d97480336aa2d9ed954f2e1f19b54cdd2108e Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sun, 4 Sep 2011 22:06:28 -0300 Subject: Document possible optimization for the --pack-binary-rock option. --- src/luarocks/build.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/luarocks/build.lua b/src/luarocks/build.lua index 77dd1dad..dec61999 100644 --- a/src/luarocks/build.lua +++ b/src/luarocks/build.lua @@ -291,6 +291,14 @@ local function do_build(name, version) end local function pack_binary_rock(name, version) + + -- The --pack-binary-rock option for "luarocks build" basically performs + -- "luarocks build" on a temporary tree and then "luarocks pack". The + -- alternative would require refactoring parts of luarocks.build and + -- luarocks.pack, which would save a few file operations: the idea would be + -- to shave off the final deploy steps from the build phase and the initial + -- collect steps from the pack phase. + local temp_dir = fs.make_temp_dir("luarocks-build-pack-"..dir.base_name(name)) if not temp_dir then return nil, "Failed creating temporary directory." -- cgit v1.2.3-55-g6feb