<div dir="ltr"><div>Hi, Leonid.</div><div><br></div><div>Thanks for your patch, LGTM.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 13 Apr 2020 at 16:09, Leonid Vasiliev <<a href="mailto:lvasiliev@tarantool.org">lvasiliev@tarantool.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Flag --chdir for make command (with help) has been added.<br>
It's add possibility to specify a source directory of the rock when make.<br>
---<br>
<br>
<a href="https://github.com/tarantool/tarantool/issues/4629" rel="noreferrer" target="_blank">https://github.com/tarantool/tarantool/issues/4629</a><br>
<a href="https://github.com/tarantool/luarocks/tree/lvasiliev/gh-4629-add-chdir-to-make" rel="noreferrer" target="_blank">https://github.com/tarantool/luarocks/tree/lvasiliev/gh-4629-add-chdir-to-make</a><br>
See corresponding patch for tarantoolctl<br>
(<a href="https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4629-forward-flags" rel="noreferrer" target="_blank">https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4629-forward-flags</a>)<br>
<br>
Motivation:<br>
Imperfect integretion of the Luarocks to tarantoolctl<br>
(enable some commands)<br>
<br>
Was done:<br>
whitelist of tarantoolctl don't used for luarocks flags<br>
Option chdir has been moved from tarantoolctl to luarocks<br>
<br>
@ChangeLog - see a comment in tarantool<br>
<br>
src/luarocks/cmd/make.lua | 8 ++++++++<br>
src/luarocks/util.lua | 1 +<br>
2 files changed, 9 insertions(+)<br>
<br>
diff --git a/src/luarocks/cmd/make.lua b/src/luarocks/cmd/make.lua<br>
index 4d81386..015b01d 100644<br>
--- a/src/luarocks/cmd/make.lua<br>
+++ b/src/luarocks/cmd/make.lua<br>
@@ -59,6 +59,8 @@ only dependencies of the rockspec (see `luarocks help install`).<br>
--sign To be used with --pack-binary-rock. Also produce<br>
a signature file for the generated .rock file.<br>
<br>
+--chdir=<path> Specify a source directory of the rock.<br>
+<br>
]]<br>
<br>
--- Driver function for "make" command.<br>
@@ -68,6 +70,12 @@ only dependencies of the rockspec (see `luarocks help install`).<br>
function make.command(flags, rockspec_filename)<br>
assert(type(rockspec_filename) == "string" or not rockspec_filename)<br>
<br>
+ if flags["chdir"] then<br>
+ local ok, err = fs.change_dir(flags["chdir"])<br>
+ if not ok then<br>
+ return nil, err<br>
+ end<br>
+ end<br>
if not rockspec_filename then<br>
local err<br>
rockspec_filename, err = util.get_default_rockspec()<br>
diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua<br>
index abf6d90..8ccda27 100644<br>
--- a/src/luarocks/util.lua<br>
+++ b/src/luarocks/util.lua<br>
@@ -92,6 +92,7 @@ local supported_flags = {<br>
["binary"] = true,<br>
["branch"] = "<branch-name>",<br>
["build-deps"] = true,<br>
+ ["chdir"] = "<path>",<br>
["debug"] = true,<br>
["deps"] = true,<br>
["deps-mode"] = "<mode>",<br>
-- <br>
2.7.4<br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><span><div><div dir="ltr">С уважением. <br>Дынников Ярослав.<br></div></div></span></div></div>