* [Tarantool-patches] [PATCH V4] Add the chdir option for make
@ 2020-04-13 13:09 Leonid Vasiliev
2020-04-13 13:24 ` Yaroslav Dynnikov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Leonid Vasiliev @ 2020-04-13 13:09 UTC (permalink / raw)
To: v.shpilevoy, yaroslav.dynnikov; +Cc: tarantool-patches
Flag --chdir for make command (with help) has been added.
It's add possibility to specify a source directory of the rock when make.
---
https://github.com/tarantool/tarantool/issues/4629
https://github.com/tarantool/luarocks/tree/lvasiliev/gh-4629-add-chdir-to-make
See corresponding patch for tarantoolctl
(https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4629-forward-flags)
Motivation:
Imperfect integretion of the Luarocks to tarantoolctl
(enable some commands)
Was done:
whitelist of tarantoolctl don't used for luarocks flags
Option chdir has been moved from tarantoolctl to luarocks
@ChangeLog - see a comment in tarantool
src/luarocks/cmd/make.lua | 8 ++++++++
src/luarocks/util.lua | 1 +
2 files changed, 9 insertions(+)
diff --git a/src/luarocks/cmd/make.lua b/src/luarocks/cmd/make.lua
index 4d81386..015b01d 100644
--- a/src/luarocks/cmd/make.lua
+++ b/src/luarocks/cmd/make.lua
@@ -59,6 +59,8 @@ only dependencies of the rockspec (see `luarocks help install`).
--sign To be used with --pack-binary-rock. Also produce
a signature file for the generated .rock file.
+--chdir=<path> Specify a source directory of the rock.
+
]]
--- Driver function for "make" command.
@@ -68,6 +70,12 @@ only dependencies of the rockspec (see `luarocks help install`).
function make.command(flags, rockspec_filename)
assert(type(rockspec_filename) == "string" or not rockspec_filename)
+ if flags["chdir"] then
+ local ok, err = fs.change_dir(flags["chdir"])
+ if not ok then
+ return nil, err
+ end
+ end
if not rockspec_filename then
local err
rockspec_filename, err = util.get_default_rockspec()
diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua
index abf6d90..8ccda27 100644
--- a/src/luarocks/util.lua
+++ b/src/luarocks/util.lua
@@ -92,6 +92,7 @@ local supported_flags = {
["binary"] = true,
["branch"] = "<branch-name>",
["build-deps"] = true,
+ ["chdir"] = "<path>",
["debug"] = true,
["deps"] = true,
["deps-mode"] = "<mode>",
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Tarantool-patches] [PATCH V4] Add the chdir option for make
2020-04-13 13:09 [Tarantool-patches] [PATCH V4] Add the chdir option for make Leonid Vasiliev
@ 2020-04-13 13:24 ` Yaroslav Dynnikov
2020-04-13 14:58 ` Vladislav Shpilevoy
2020-04-14 7:47 ` Kirill Yukhin
2 siblings, 0 replies; 4+ messages in thread
From: Yaroslav Dynnikov @ 2020-04-13 13:24 UTC (permalink / raw)
To: Leonid Vasiliev; +Cc: Yaroslav Dynnikov, tarantool-patches, Vladislav Shpilevoy
[-- Attachment #1: Type: text/plain, Size: 2487 bytes --]
Hi, Leonid.
Thanks for your patch, LGTM.
On Mon, 13 Apr 2020 at 16:09, Leonid Vasiliev <lvasiliev@tarantool.org>
wrote:
> Flag --chdir for make command (with help) has been added.
> It's add possibility to specify a source directory of the rock when make.
> ---
>
> https://github.com/tarantool/tarantool/issues/4629
>
> https://github.com/tarantool/luarocks/tree/lvasiliev/gh-4629-add-chdir-to-make
> See corresponding patch for tarantoolctl
> (
> https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4629-forward-flags
> )
>
> Motivation:
> Imperfect integretion of the Luarocks to tarantoolctl
> (enable some commands)
>
> Was done:
> whitelist of tarantoolctl don't used for luarocks flags
> Option chdir has been moved from tarantoolctl to luarocks
>
> @ChangeLog - see a comment in tarantool
>
> src/luarocks/cmd/make.lua | 8 ++++++++
> src/luarocks/util.lua | 1 +
> 2 files changed, 9 insertions(+)
>
> diff --git a/src/luarocks/cmd/make.lua b/src/luarocks/cmd/make.lua
> index 4d81386..015b01d 100644
> --- a/src/luarocks/cmd/make.lua
> +++ b/src/luarocks/cmd/make.lua
> @@ -59,6 +59,8 @@ only dependencies of the rockspec (see `luarocks help
> install`).
> --sign To be used with --pack-binary-rock. Also produce
> a signature file for the generated .rock file.
>
> +--chdir=<path> Specify a source directory of the rock.
> +
> ]]
>
> --- Driver function for "make" command.
> @@ -68,6 +70,12 @@ only dependencies of the rockspec (see `luarocks help
> install`).
> function make.command(flags, rockspec_filename)
> assert(type(rockspec_filename) == "string" or not rockspec_filename)
>
> + if flags["chdir"] then
> + local ok, err = fs.change_dir(flags["chdir"])
> + if not ok then
> + return nil, err
> + end
> + end
> if not rockspec_filename then
> local err
> rockspec_filename, err = util.get_default_rockspec()
> diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua
> index abf6d90..8ccda27 100644
> --- a/src/luarocks/util.lua
> +++ b/src/luarocks/util.lua
> @@ -92,6 +92,7 @@ local supported_flags = {
> ["binary"] = true,
> ["branch"] = "<branch-name>",
> ["build-deps"] = true,
> + ["chdir"] = "<path>",
> ["debug"] = true,
> ["deps"] = true,
> ["deps-mode"] = "<mode>",
> --
> 2.7.4
>
>
--
С уважением.
Дынников Ярослав.
[-- Attachment #2: Type: text/html, Size: 3652 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Tarantool-patches] [PATCH V4] Add the chdir option for make
2020-04-13 13:09 [Tarantool-patches] [PATCH V4] Add the chdir option for make Leonid Vasiliev
2020-04-13 13:24 ` Yaroslav Dynnikov
@ 2020-04-13 14:58 ` Vladislav Shpilevoy
2020-04-14 7:47 ` Kirill Yukhin
2 siblings, 0 replies; 4+ messages in thread
From: Vladislav Shpilevoy @ 2020-04-13 14:58 UTC (permalink / raw)
To: Leonid Vasiliev, yaroslav.dynnikov; +Cc: tarantool-patches
Thanks for the patch!
LGTM.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Tarantool-patches] [PATCH V4] Add the chdir option for make
2020-04-13 13:09 [Tarantool-patches] [PATCH V4] Add the chdir option for make Leonid Vasiliev
2020-04-13 13:24 ` Yaroslav Dynnikov
2020-04-13 14:58 ` Vladislav Shpilevoy
@ 2020-04-14 7:47 ` Kirill Yukhin
2 siblings, 0 replies; 4+ messages in thread
From: Kirill Yukhin @ 2020-04-14 7:47 UTC (permalink / raw)
To: Leonid Vasiliev; +Cc: yaroslav.dynnikov, tarantool-patches, v.shpilevoy
Hello,
On 13 Apr 16:09, Leonid Vasiliev wrote:
> Flag --chdir for make command (with help) has been added.
> It's add possibility to specify a source directory of the rock when make.
> ---
>
> https://github.com/tarantool/tarantool/issues/4629
> https://github.com/tarantool/luarocks/tree/lvasiliev/gh-4629-add-chdir-to-make
> See corresponding patch for tarantoolctl
> (https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4629-forward-flags)
I've checked your patch in to tarantool/luarocks repo and bumped
new version of luarocks in master branch.
--
Regards, Kirill Yukhin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-14 7:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 13:09 [Tarantool-patches] [PATCH V4] Add the chdir option for make Leonid Vasiliev
2020-04-13 13:24 ` Yaroslav Dynnikov
2020-04-13 14:58 ` Vladislav Shpilevoy
2020-04-14 7:47 ` Kirill Yukhin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox