* [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module
@ 2020-03-16 11:50 Leonid Vasiliev
2020-03-16 11:50 ` [Tarantool-patches] [PATCH v2 1/2] luarocks: Add a kludge for option all of luarocks search Leonid Vasiliev
` (5 more replies)
0 siblings, 6 replies; 17+ messages in thread
From: Leonid Vasiliev @ 2020-03-16 11:50 UTC (permalink / raw)
To: v.shpilevoy; +Cc: tarantool-patches
https://github.com/tarantool/tarantool/issues/3632
https://github.com/tarantool/tarantool/issues/4529
https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4529-fix-show-all
Some new options (--all and --force) have been added to the white-list for forwarding to the tarantoolctl rocks module.
Leonid (2):
luarocks: Add a kludge for option all of luarocks search
luarocks: Add a kludge for option force of luarocks remove
extra/dist/tarantoolctl.in | 11 +++++++++++
1 file changed, 11 insertions(+)
--
2.17.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Tarantool-patches] [PATCH v2 1/2] luarocks: Add a kludge for option all of luarocks search
2020-03-16 11:50 [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module Leonid Vasiliev
@ 2020-03-16 11:50 ` Leonid Vasiliev
2020-03-16 12:01 ` Leonid Vasiliev
2020-03-31 23:21 ` Igor Munkin
2020-03-16 11:50 ` [Tarantool-patches] [PATCH v2 2/2] luarocks: Add a kludge for option force of luarocks remove Leonid Vasiliev
` (4 subsequent siblings)
5 siblings, 2 replies; 17+ messages in thread
From: Leonid Vasiliev @ 2020-03-16 11:50 UTC (permalink / raw)
To: v.shpilevoy; +Cc: tarantool-patches
From: Leonid <lvasiliev@tarantool.org>
Fixed the tarantoolctl rocks search flag --all
Forwarding of the --all flag to tarantoolctl rocks module was added.
(Command: tarantoolctl rocks search --all)
Fixes: #4529
---
| 6 ++++++
1 file changed, 6 insertions(+)
--git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
index 6daf866ac..372838edd 100755
--- a/extra/dist/tarantoolctl.in
+++ b/extra/dist/tarantoolctl.in
@@ -937,6 +937,7 @@ local function rocks()
local util = require("luarocks.util")
local command_line = require("luarocks.cmd")
local options = keyword_arguments
+
local key = nil
if options["only-server"] ~= nil then
key = find_arg("only%-server")
@@ -945,6 +946,10 @@ local function rocks()
end
table.insert(positional_arguments, key)
+ if positional_arguments[1] == "search" and find_arg("all") then
+ table.insert(positional_arguments, "--all")
+ end
+
-- Tweak help messages
util.see_help = function(command, program)
-- TODO: print extended help message here
@@ -1400,6 +1405,7 @@ local function populate_arguments()
{ 'only-server', 'string' },
{ 'server', 'string' },
{ 'language', 'string' },
+ { 'all', 'boolean' },
})
local cmd_name
--
2.17.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Tarantool-patches] [PATCH v2 2/2] luarocks: Add a kludge for option force of luarocks remove
2020-03-16 11:50 [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module Leonid Vasiliev
2020-03-16 11:50 ` [Tarantool-patches] [PATCH v2 1/2] luarocks: Add a kludge for option all of luarocks search Leonid Vasiliev
@ 2020-03-16 11:50 ` Leonid Vasiliev
2020-03-31 23:21 ` Igor Munkin
2020-03-18 22:34 ` [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module Vladislav Shpilevoy
` (3 subsequent siblings)
5 siblings, 1 reply; 17+ messages in thread
From: Leonid Vasiliev @ 2020-03-16 11:50 UTC (permalink / raw)
To: v.shpilevoy; +Cc: tarantool-patches
From: Leonid <lvasiliev@tarantool.org>
Fixed the tarantoolctl rocks remove flag --force
Forwarding of the --force flag to tarantoolctl rocks module was added.
(Command: tarantoolctl rocks remove --force)
Fixes: #3632
---
| 5 +++++
1 file changed, 5 insertions(+)
--git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
index 372838edd..c6c3ecb8f 100755
--- a/extra/dist/tarantoolctl.in
+++ b/extra/dist/tarantoolctl.in
@@ -950,6 +950,10 @@ local function rocks()
table.insert(positional_arguments, "--all")
end
+ if positional_arguments[1] == "remove" and find_arg("force") then
+ table.insert(positional_arguments, "--force")
+ end
+
-- Tweak help messages
util.see_help = function(command, program)
-- TODO: print extended help message here
@@ -1406,6 +1410,7 @@ local function populate_arguments()
{ 'server', 'string' },
{ 'language', 'string' },
{ 'all', 'boolean' },
+ { 'force', 'boolean' },
})
local cmd_name
--
2.17.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Tarantool-patches] [PATCH v2 1/2] luarocks: Add a kludge for option all of luarocks search
2020-03-16 11:50 ` [Tarantool-patches] [PATCH v2 1/2] luarocks: Add a kludge for option all of luarocks search Leonid Vasiliev
@ 2020-03-16 12:01 ` Leonid Vasiliev
2020-03-31 23:21 ` Igor Munkin
1 sibling, 0 replies; 17+ messages in thread
From: Leonid Vasiliev @ 2020-03-16 12:01 UTC (permalink / raw)
To: v.shpilevoy; +Cc: tarantool-patches
On 3/16/20 2:50 PM, Leonid Vasiliev wrote:
> From: Leonid <lvasiliev@tarantool.org>
>
> Fixed the tarantoolctl rocks search flag --all
>
> Forwarding of the --all flag to tarantoolctl rocks module was added.
> (Command: tarantoolctl rocks search --all)
>
> Fixes: #4529
> ---
> extra/dist/tarantoolctl.in | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
> index 6daf866ac..372838edd 100755
> --- a/extra/dist/tarantoolctl.in
> +++ b/extra/dist/tarantoolctl.in
> @@ -937,6 +937,7 @@ local function rocks()
> local util = require("luarocks.util")
> local command_line = require("luarocks.cmd")
> local options = keyword_arguments
> +
> local key = nil
> if options["only-server"] ~= nil then
> key = find_arg("only%-server")
> @@ -945,6 +946,10 @@ local function rocks()
> end
> table.insert(positional_arguments, key)
>
> + if positional_arguments[1] == "search" and find_arg("all") then
> + table.insert(positional_arguments, "--all")
> + end
> +
> -- Tweak help messages
> util.see_help = function(command, program)
> -- TODO: print extended help message here
> @@ -1400,6 +1405,7 @@ local function populate_arguments()
> { 'only-server', 'string' },
> { 'server', 'string' },
> { 'language', 'string' },
> + { 'all', 'boolean' },
> })
>
> local cmd_name
>
diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
index c6c3ecb8f..2b95e2957 100755
--- a/extra/dist/tarantoolctl.in
+++ b/extra/dist/tarantoolctl.in
@@ -937,7 +937,6 @@ local function rocks()
local util = require("luarocks.util")
local command_line = require("luarocks.cmd")
local options = keyword_arguments
-
local key = nil
if options["only-server"] ~= nil then
key = find_arg("only%-server")
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module
2020-03-16 11:50 [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module Leonid Vasiliev
2020-03-16 11:50 ` [Tarantool-patches] [PATCH v2 1/2] luarocks: Add a kludge for option all of luarocks search Leonid Vasiliev
2020-03-16 11:50 ` [Tarantool-patches] [PATCH v2 2/2] luarocks: Add a kludge for option force of luarocks remove Leonid Vasiliev
@ 2020-03-18 22:34 ` Vladislav Shpilevoy
2020-03-19 19:19 ` Igor Munkin
2020-04-01 11:33 ` Igor Munkin
` (2 subsequent siblings)
5 siblings, 1 reply; 17+ messages in thread
From: Vladislav Shpilevoy @ 2020-03-18 22:34 UTC (permalink / raw)
To: Leonid Vasiliev; +Cc: tarantool-patches
LGTM. I guess you still need a second review though.
Since Alexander is always busy, I don't know who to
ask.
On 16/03/2020 12:50, Leonid Vasiliev wrote:
> https://github.com/tarantool/tarantool/issues/3632
> https://github.com/tarantool/tarantool/issues/4529
> https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4529-fix-show-all
>
> Some new options (--all and --force) have been added to the white-list for forwarding to the tarantoolctl rocks module.
>
> Leonid (2):
> luarocks: Add a kludge for option all of luarocks search
> luarocks: Add a kludge for option force of luarocks remove
>
> extra/dist/tarantoolctl.in | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module
2020-03-18 22:34 ` [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module Vladislav Shpilevoy
@ 2020-03-19 19:19 ` Igor Munkin
0 siblings, 0 replies; 17+ messages in thread
From: Igor Munkin @ 2020-03-19 19:19 UTC (permalink / raw)
To: Vladislav Shpilevoy; +Cc: tarantool-patches
Vlad,
I'll take it.
On 18.03.20, Vladislav Shpilevoy wrote:
> LGTM. I guess you still need a second review though.
> Since Alexander is always busy, I don't know who to
> ask.
>
> On 16/03/2020 12:50, Leonid Vasiliev wrote:
> > https://github.com/tarantool/tarantool/issues/3632
> > https://github.com/tarantool/tarantool/issues/4529
> > https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4529-fix-show-all
> >
> > Some new options (--all and --force) have been added to the white-list for forwarding to the tarantoolctl rocks module.
> >
> > Leonid (2):
> > luarocks: Add a kludge for option all of luarocks search
> > luarocks: Add a kludge for option force of luarocks remove
> >
> > extra/dist/tarantoolctl.in | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
--
Best regards,
IM
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Tarantool-patches] [PATCH v2 1/2] luarocks: Add a kludge for option all of luarocks search
2020-03-16 11:50 ` [Tarantool-patches] [PATCH v2 1/2] luarocks: Add a kludge for option all of luarocks search Leonid Vasiliev
2020-03-16 12:01 ` Leonid Vasiliev
@ 2020-03-31 23:21 ` Igor Munkin
2020-04-01 10:00 ` lvasiliev
1 sibling, 1 reply; 17+ messages in thread
From: Igor Munkin @ 2020-03-31 23:21 UTC (permalink / raw)
To: Leonid Vasiliev; +Cc: tarantool-patches, v.shpilevoy
Leonid,
Thanks for the patch! Please consider the comment below.
On 16.03.20, Leonid Vasiliev wrote:
> From: Leonid <lvasiliev@tarantool.org>
>
> Fixed the tarantoolctl rocks search flag --all
>
> Forwarding of the --all flag to tarantoolctl rocks module was added.
> (Command: tarantoolctl rocks search --all)
>
> Fixes: #4529
> ---
> extra/dist/tarantoolctl.in | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
> index 6daf866ac..372838edd 100755
> --- a/extra/dist/tarantoolctl.in
> +++ b/extra/dist/tarantoolctl.in
<snipped>
> @@ -945,6 +946,10 @@ local function rocks()
> end
> table.insert(positional_arguments, key)
>
> + if positional_arguments[1] == "search" and find_arg("all") then
This is a bad check. Consider the following example:
| $ export LUA_PATH="$LUA_PATH;third_party/luarocks/src/?.lua;;"
| $ ./extra/dist/tarantoolctl rocks search --all > valid.out
| $ wc valid.out && echo "Non-empty output"
| 17835 56986 605906 valid.out
| Non-empty output
| $ ./extra/dist/tarantoolctl rocks search all --force > invalid.out
| $ diff -u valid.out invalid.out && echo "Outputs are the same"
| Outputs are the same
You need to check whether 'all' key exists in keyword_arguments, not to
search 'all' substring in arg tables values.
> + table.insert(positional_arguments, "--all")
> + end
> +
> -- Tweak help messages
> util.see_help = function(command, program)
> -- TODO: print extended help message here
<snipped>
> --
> 2.17.1
>
--
Best regards,
IM
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Tarantool-patches] [PATCH v2 2/2] luarocks: Add a kludge for option force of luarocks remove
2020-03-16 11:50 ` [Tarantool-patches] [PATCH v2 2/2] luarocks: Add a kludge for option force of luarocks remove Leonid Vasiliev
@ 2020-03-31 23:21 ` Igor Munkin
2020-04-01 10:02 ` lvasiliev
0 siblings, 1 reply; 17+ messages in thread
From: Igor Munkin @ 2020-03-31 23:21 UTC (permalink / raw)
To: Leonid Vasiliev; +Cc: tarantool-patches, v.shpilevoy
Leonid,
Thanks for the patch! Please consider the comment below.
On 16.03.20, Leonid Vasiliev wrote:
> From: Leonid <lvasiliev@tarantool.org>
>
> Fixed the tarantoolctl rocks remove flag --force
>
> Forwarding of the --force flag to tarantoolctl rocks module was added.
> (Command: tarantoolctl rocks remove --force)
>
> Fixes: #3632
> ---
> extra/dist/tarantoolctl.in | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
> index 372838edd..c6c3ecb8f 100755
> --- a/extra/dist/tarantoolctl.in
> +++ b/extra/dist/tarantoolctl.in
> @@ -950,6 +950,10 @@ local function rocks()
> table.insert(positional_arguments, "--all")
> end
>
> + if positional_arguments[1] == "remove" and find_arg("force") then
This is a bad check. Consider the following example (I patched the
tarantoolctl.in a little for it):
| $ export LUA_PATH="$LUA_PATH;third_party/luarocks/src/?.lua;;"
| $ ./extra/dist/tarantoolctl rocks install try/force-scm-1.rockspec
| <snipped>
| force scm-1 is now installed in /home/imun/.luarocks
| $ git diff
| diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
| index 2b95e2957..2378dee2b 100755
| --- a/extra/dist/tarantoolctl.in
| +++ b/extra/dist/tarantoolctl.in
| @@ -950,6 +950,7 @@ local function rocks()
| end
|
| if positional_arguments[1] == "remove" and find_arg("force") then
| + print('WARN: --force option is set for remove')
| table.insert(positional_arguments, "--force")
| end
|
| $ ./extra/dist/tarantoolctl rocks remove force
| WARN: --force option is set for remove
| Checking stability of dependencies in the absence of
| force scm-1...
|
| Removing force scm-1...
| Removal successful.
You need to check whether 'force' key exists in keyword_arguments, not
to search 'force' substring in arg tables values.
> + table.insert(positional_arguments, "--force")
> + end
> +
> -- Tweak help messages
> util.see_help = function(command, program)
> -- TODO: print extended help message here
<snipped>
> --
> 2.17.1
>
--
Best regards,
IM
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Tarantool-patches] [PATCH v2 1/2] luarocks: Add a kludge for option all of luarocks search
2020-03-31 23:21 ` Igor Munkin
@ 2020-04-01 10:00 ` lvasiliev
2020-04-02 15:50 ` lvasiliev
0 siblings, 1 reply; 17+ messages in thread
From: lvasiliev @ 2020-04-01 10:00 UTC (permalink / raw)
To: Igor Munkin; +Cc: tarantool-patches, v.shpilevoy
Hi, thanks for the review. You're darn right!
diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
index 2b95e29..b26dd10 100755
--- a/extra/dist/tarantoolctl.in
+++ b/extra/dist/tarantoolctl.in
@@ -945,7 +945,7 @@ local function rocks()
end
table.insert(positional_arguments, key)
- if positional_arguments[1] == "search" and find_arg("all") then
+ if positional_arguments[1] == "search" and keyword_arguments["all"]
then
table.insert(positional_arguments, "--all")
end
On 01.04.2020 2:21, Igor Munkin wrote:
> Leonid,
>
> Thanks for the patch! Please consider the comment below.
>
> On 16.03.20, Leonid Vasiliev wrote:
>> From: Leonid <lvasiliev@tarantool.org>
>>
>> Fixed the tarantoolctl rocks search flag --all
>>
>> Forwarding of the --all flag to tarantoolctl rocks module was added.
>> (Command: tarantoolctl rocks search --all)
>>
>> Fixes: #4529
>> ---
>> extra/dist/tarantoolctl.in | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
>> index 6daf866ac..372838edd 100755
>> --- a/extra/dist/tarantoolctl.in
>> +++ b/extra/dist/tarantoolctl.in
>
> <snipped>
>
>> @@ -945,6 +946,10 @@ local function rocks()
>> end
>> table.insert(positional_arguments, key)
>>
>> + if positional_arguments[1] == "search" and find_arg("all") then
>
> This is a bad check. Consider the following example:
> | $ export LUA_PATH="$LUA_PATH;third_party/luarocks/src/?.lua;;"
> | $ ./extra/dist/tarantoolctl rocks search --all > valid.out
> | $ wc valid.out && echo "Non-empty output"
> | 17835 56986 605906 valid.out
> | Non-empty output
> | $ ./extra/dist/tarantoolctl rocks search all --force > invalid.out
> | $ diff -u valid.out invalid.out && echo "Outputs are the same"
> | Outputs are the same
>
> You need to check whether 'all' key exists in keyword_arguments, not to
> search 'all' substring in arg tables values.
>
>> + table.insert(positional_arguments, "--all")
>> + end
>> +
>> -- Tweak help messages
>> util.see_help = function(command, program)
>> -- TODO: print extended help message here
>
> <snipped>
>
>> --
>> 2.17.1
>>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Tarantool-patches] [PATCH v2 2/2] luarocks: Add a kludge for option force of luarocks remove
2020-03-31 23:21 ` Igor Munkin
@ 2020-04-01 10:02 ` lvasiliev
2020-04-02 15:52 ` lvasiliev
0 siblings, 1 reply; 17+ messages in thread
From: lvasiliev @ 2020-04-01 10:02 UTC (permalink / raw)
To: Igor Munkin; +Cc: tarantool-patches, v.shpilevoy
Hi, thanks for the review. You're darn right!
diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
index b26dd10..f84c702 100755
--- a/extra/dist/tarantoolctl.in
+++ b/extra/dist/tarantoolctl.in
@@ -949,7 +949,7 @@ local function rocks()
table.insert(positional_arguments, "--all")
end
- if positional_arguments[1] == "remove" and find_arg("force") then
+ if positional_arguments[1] == "remove" and
keyword_arguments["force"] then
table.insert(positional_arguments, "--force")
end
On 01.04.2020 2:21, Igor Munkin wrote:
> Leonid,
>
> Thanks for the patch! Please consider the comment below.
>
> On 16.03.20, Leonid Vasiliev wrote:
>> From: Leonid <lvasiliev@tarantool.org>
>>
>> Fixed the tarantoolctl rocks remove flag --force
>>
>> Forwarding of the --force flag to tarantoolctl rocks module was added.
>> (Command: tarantoolctl rocks remove --force)
>>
>> Fixes: #3632
>> ---
>> extra/dist/tarantoolctl.in | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
>> index 372838edd..c6c3ecb8f 100755
>> --- a/extra/dist/tarantoolctl.in
>> +++ b/extra/dist/tarantoolctl.in
>> @@ -950,6 +950,10 @@ local function rocks()
>> table.insert(positional_arguments, "--all")
>> end
>>
>> + if positional_arguments[1] == "remove" and find_arg("force") then
>
> This is a bad check. Consider the following example (I patched the
> tarantoolctl.in a little for it):
> | $ export LUA_PATH="$LUA_PATH;third_party/luarocks/src/?.lua;;"
> | $ ./extra/dist/tarantoolctl rocks install try/force-scm-1.rockspec
> | <snipped>
> | force scm-1 is now installed in /home/imun/.luarocks
> | $ git diff
> | diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
> | index 2b95e2957..2378dee2b 100755
> | --- a/extra/dist/tarantoolctl.in
> | +++ b/extra/dist/tarantoolctl.in
> | @@ -950,6 +950,7 @@ local function rocks()
> | end
> |
> | if positional_arguments[1] == "remove" and find_arg("force") then
> | + print('WARN: --force option is set for remove')
> | table.insert(positional_arguments, "--force")
> | end
> |
> | $ ./extra/dist/tarantoolctl rocks remove force
> | WARN: --force option is set for remove
> | Checking stability of dependencies in the absence of
> | force scm-1...
> |
> | Removing force scm-1...
> | Removal successful.
>
> You need to check whether 'force' key exists in keyword_arguments, not
> to search 'force' substring in arg tables values.
>
>> + table.insert(positional_arguments, "--force")
>> + end
>> +
>> -- Tweak help messages
>> util.see_help = function(command, program)
>> -- TODO: print extended help message here
>
> <snipped>
>
>> --
>> 2.17.1
>>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module
2020-03-16 11:50 [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module Leonid Vasiliev
` (2 preceding siblings ...)
2020-03-18 22:34 ` [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module Vladislav Shpilevoy
@ 2020-04-01 11:33 ` Igor Munkin
2020-04-02 7:35 ` lvasiliev
2020-04-02 15:34 ` Kirill Yukhin
2020-04-04 18:40 ` Vladislav Shpilevoy
5 siblings, 1 reply; 17+ messages in thread
From: Igor Munkin @ 2020-04-01 11:33 UTC (permalink / raw)
To: Leonid Vasiliev; +Cc: tarantool-patches, v.shpilevoy
Leonid,
Thanks for the series! Considering your post-review fixups and omitting
other comments I have regarding the tarantoolctl code, it LGTM.
Please add a ChangeLog entry for your patchset.
Sasha, please proceed with the series.
On 16.03.20, Leonid Vasiliev wrote:
> https://github.com/tarantool/tarantool/issues/3632
> https://github.com/tarantool/tarantool/issues/4529
> https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4529-fix-show-all
>
> Some new options (--all and --force) have been added to the white-list for forwarding to the tarantoolctl rocks module.
>
> Leonid (2):
> luarocks: Add a kludge for option all of luarocks search
> luarocks: Add a kludge for option force of luarocks remove
>
> extra/dist/tarantoolctl.in | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> --
> 2.17.1
>
--
Best regards,
IM
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module
2020-04-01 11:33 ` Igor Munkin
@ 2020-04-02 7:35 ` lvasiliev
0 siblings, 0 replies; 17+ messages in thread
From: lvasiliev @ 2020-04-02 7:35 UTC (permalink / raw)
To: imun; +Cc: tarantool-patches, v.shpilevoy
Hi, thanks for the review.
On 01.04.2020 14:33, Igor Munkin wrote:
> Leonid,
>
> Thanks for the series! Considering your post-review fixups and omitting
> other comments I have regarding the tarantoolctl code, it LGTM.
>
> Please add a ChangeLog entry for your patchset.
Done
(https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4529-fix-show-all)
@Changelog
Fixed the tarantoolctl rocks search flag --all
and
@Changelog
Fixed the tarantoolctl rocks remove flag --force
>
> Sasha, please proceed with the series.
>
> On 16.03.20, Leonid Vasiliev wrote:
>> https://github.com/tarantool/tarantool/issues/3632
>> https://github.com/tarantool/tarantool/issues/4529
>> https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4529-fix-show-all
>>
>> Some new options (--all and --force) have been added to the white-list for forwarding to the tarantoolctl rocks module.
>>
>> Leonid (2):
>> luarocks: Add a kludge for option all of luarocks search
>> luarocks: Add a kludge for option force of luarocks remove
>>
>> extra/dist/tarantoolctl.in | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> --
>> 2.17.1
>>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module
2020-03-16 11:50 [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module Leonid Vasiliev
` (3 preceding siblings ...)
2020-04-01 11:33 ` Igor Munkin
@ 2020-04-02 15:34 ` Kirill Yukhin
2020-04-09 1:00 ` Alexander Turenko
2020-04-04 18:40 ` Vladislav Shpilevoy
5 siblings, 1 reply; 17+ messages in thread
From: Kirill Yukhin @ 2020-04-02 15:34 UTC (permalink / raw)
To: Leonid Vasiliev; +Cc: tarantool-patches, v.shpilevoy
Hello,
On 16 мар 14:50, Leonid Vasiliev wrote:
> https://github.com/tarantool/tarantool/issues/3632
> https://github.com/tarantool/tarantool/issues/4529
> https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4529-fix-show-all
I've checked your patchset into 2.2, 2.3 and master.
--
Regards, Kirill Yukhin
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Tarantool-patches] [PATCH v2 1/2] luarocks: Add a kludge for option all of luarocks search
2020-04-01 10:00 ` lvasiliev
@ 2020-04-02 15:50 ` lvasiliev
0 siblings, 0 replies; 17+ messages in thread
From: lvasiliev @ 2020-04-02 15:50 UTC (permalink / raw)
To: tarantool-patches
@Changelog
Fixed the tarantoolctl rocks search flag --all
(https://github.com/tarantool/tarantool/issues/4529)
On 01.04.2020 13:00, lvasiliev wrote:
> Hi, thanks for the review. You're darn right!
>
> diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
> index 2b95e29..b26dd10 100755
> --- a/extra/dist/tarantoolctl.in
> +++ b/extra/dist/tarantoolctl.in
> @@ -945,7 +945,7 @@ local function rocks()
> end
> table.insert(positional_arguments, key)
>
> - if positional_arguments[1] == "search" and find_arg("all") then
> + if positional_arguments[1] == "search" and keyword_arguments["all"]
> then
> table.insert(positional_arguments, "--all")
> end
>
> On 01.04.2020 2:21, Igor Munkin wrote:
>> Leonid,
>>
>> Thanks for the patch! Please consider the comment below.
>>
>> On 16.03.20, Leonid Vasiliev wrote:
>>> From: Leonid <lvasiliev@tarantool.org>
>>>
>>> Fixed the tarantoolctl rocks search flag --all
>>>
>>> Forwarding of the --all flag to tarantoolctl rocks module was added.
>>> (Command: tarantoolctl rocks search --all)
>>>
>>> Fixes: #4529
>>> ---
>>> extra/dist/tarantoolctl.in | 6 ++++++
>>> 1 file changed, 6 insertions(+)
>>>
>>> diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
>>> index 6daf866ac..372838edd 100755
>>> --- a/extra/dist/tarantoolctl.in
>>> +++ b/extra/dist/tarantoolctl.in
>>
>> <snipped>
>>
>>> @@ -945,6 +946,10 @@ local function rocks()
>>> end
>>> table.insert(positional_arguments, key)
>>> + if positional_arguments[1] == "search" and find_arg("all") then
>>
>> This is a bad check. Consider the following example:
>> | $ export LUA_PATH="$LUA_PATH;third_party/luarocks/src/?.lua;;"
>> | $ ./extra/dist/tarantoolctl rocks search --all > valid.out
>> | $ wc valid.out && echo "Non-empty output"
>> | 17835 56986 605906 valid.out
>> | Non-empty output
>> | $ ./extra/dist/tarantoolctl rocks search all --force > invalid.out
>> | $ diff -u valid.out invalid.out && echo "Outputs are the same"
>> | Outputs are the same
>>
>> You need to check whether 'all' key exists in keyword_arguments, not to
>> search 'all' substring in arg tables values.
>>
>>> + table.insert(positional_arguments, "--all")
>>> + end
>>> +
>>> -- Tweak help messages
>>> util.see_help = function(command, program)
>>> -- TODO: print extended help message here
>>
>> <snipped>
>>
>>> --
>>> 2.17.1
>>>
>>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Tarantool-patches] [PATCH v2 2/2] luarocks: Add a kludge for option force of luarocks remove
2020-04-01 10:02 ` lvasiliev
@ 2020-04-02 15:52 ` lvasiliev
0 siblings, 0 replies; 17+ messages in thread
From: lvasiliev @ 2020-04-02 15:52 UTC (permalink / raw)
To: tarantool-patches
@Changelog
Fixed the tarantoolctl rocks remove flag --force
(https://github.com/tarantool/tarantool/issues/3632)
On 01.04.2020 13:02, lvasiliev wrote:
> Hi, thanks for the review. You're darn right!
>
> diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
> index b26dd10..f84c702 100755
> --- a/extra/dist/tarantoolctl.in
> +++ b/extra/dist/tarantoolctl.in
> @@ -949,7 +949,7 @@ local function rocks()
> table.insert(positional_arguments, "--all")
> end
>
> - if positional_arguments[1] == "remove" and find_arg("force") then
> + if positional_arguments[1] == "remove" and
> keyword_arguments["force"] then
> table.insert(positional_arguments, "--force")
> end
>
> On 01.04.2020 2:21, Igor Munkin wrote:
>> Leonid,
>>
>> Thanks for the patch! Please consider the comment below.
>>
>> On 16.03.20, Leonid Vasiliev wrote:
>>> From: Leonid <lvasiliev@tarantool.org>
>>>
>>> Fixed the tarantoolctl rocks remove flag --force
>>>
>>> Forwarding of the --force flag to tarantoolctl rocks module was added.
>>> (Command: tarantoolctl rocks remove --force)
>>>
>>> Fixes: #3632
>>> ---
>>> extra/dist/tarantoolctl.in | 5 +++++
>>> 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
>>> index 372838edd..c6c3ecb8f 100755
>>> --- a/extra/dist/tarantoolctl.in
>>> +++ b/extra/dist/tarantoolctl.in
>>> @@ -950,6 +950,10 @@ local function rocks()
>>> table.insert(positional_arguments, "--all")
>>> end
>>> + if positional_arguments[1] == "remove" and find_arg("force") then
>>
>> This is a bad check. Consider the following example (I patched the
>> tarantoolctl.in a little for it):
>> | $ export LUA_PATH="$LUA_PATH;third_party/luarocks/src/?.lua;;"
>> | $ ./extra/dist/tarantoolctl rocks install try/force-scm-1.rockspec
>> | <snipped>
>> | force scm-1 is now installed in /home/imun/.luarocks
>> | $ git diff
>> | diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
>> | index 2b95e2957..2378dee2b 100755
>> | --- a/extra/dist/tarantoolctl.in
>> | +++ b/extra/dist/tarantoolctl.in
>> | @@ -950,6 +950,7 @@ local function rocks()
>> | end
>> |
>> | if positional_arguments[1] == "remove" and find_arg("force") then
>> | + print('WARN: --force option is set for remove')
>> | table.insert(positional_arguments, "--force")
>> | end
>> |
>> | $ ./extra/dist/tarantoolctl rocks remove force
>> | WARN: --force option is set for remove
>> | Checking stability of dependencies in the absence of
>> | force scm-1...
>> |
>> | Removing force scm-1...
>> | Removal successful.
>>
>> You need to check whether 'force' key exists in keyword_arguments, not
>> to search 'force' substring in arg tables values.
>>
>>> + table.insert(positional_arguments, "--force")
>>> + end
>>> +
>>> -- Tweak help messages
>>> util.see_help = function(command, program)
>>> -- TODO: print extended help message here
>>
>> <snipped>
>>
>>> --
>>> 2.17.1
>>>
>>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module
2020-03-16 11:50 [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module Leonid Vasiliev
` (4 preceding siblings ...)
2020-04-02 15:34 ` Kirill Yukhin
@ 2020-04-04 18:40 ` Vladislav Shpilevoy
5 siblings, 0 replies; 17+ messages in thread
From: Vladislav Shpilevoy @ 2020-04-04 18:40 UTC (permalink / raw)
To: Leonid Vasiliev; +Cc: tarantool-patches
I just realized that you added @ChangeLog to the commit message.
And that Kirill actually just committed it as is.
Please, don't do that. @ChangeLog is a tag for emails. It should
not be added to the commit message.
On 16/03/2020 12:50, Leonid Vasiliev wrote:
> https://github.com/tarantool/tarantool/issues/3632
> https://github.com/tarantool/tarantool/issues/4529
> https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4529-fix-show-all
>
> Some new options (--all and --force) have been added to the white-list for forwarding to the tarantoolctl rocks module.
>
> Leonid (2):
> luarocks: Add a kludge for option all of luarocks search
> luarocks: Add a kludge for option force of luarocks remove
>
> extra/dist/tarantoolctl.in | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module
2020-04-02 15:34 ` Kirill Yukhin
@ 2020-04-09 1:00 ` Alexander Turenko
0 siblings, 0 replies; 17+ messages in thread
From: Alexander Turenko @ 2020-04-09 1:00 UTC (permalink / raw)
To: Kirill Yukhin; +Cc: tarantool-patches, v.shpilevoy
On Thu, Apr 02, 2020 at 06:34:06PM +0300, Kirill Yukhin wrote:
> Hello,
>
> On 16 мар 14:50, Leonid Vasiliev wrote:
> > https://github.com/tarantool/tarantool/issues/3632
> > https://github.com/tarantool/tarantool/issues/4529
> > https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4529-fix-show-all
>
> I've checked your patchset into 2.2, 2.3 and master.
> luarocks: Add a kludge for option all of luarocks search
This patch is not necessary with luarocks-2 (tarantool-1.10), because
default search behaviour on luarocks-2 is to show all packages. Nothing
to do.
> luarocks: Add a kludge for option force of luarocks remove
This is necessary on tarantool-1.10 too (I would consider the problem as
bug). Pushed to 1.10 in 1.10.5-48-g84dd4f57d.
WBR, Alexander Turenko.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2020-04-09 1:00 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 11:50 [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module Leonid Vasiliev
2020-03-16 11:50 ` [Tarantool-patches] [PATCH v2 1/2] luarocks: Add a kludge for option all of luarocks search Leonid Vasiliev
2020-03-16 12:01 ` Leonid Vasiliev
2020-03-31 23:21 ` Igor Munkin
2020-04-01 10:00 ` lvasiliev
2020-04-02 15:50 ` lvasiliev
2020-03-16 11:50 ` [Tarantool-patches] [PATCH v2 2/2] luarocks: Add a kludge for option force of luarocks remove Leonid Vasiliev
2020-03-31 23:21 ` Igor Munkin
2020-04-01 10:02 ` lvasiliev
2020-04-02 15:52 ` lvasiliev
2020-03-18 22:34 ` [Tarantool-patches] [PATCH v2 0/2] Fix some options of rocks module Vladislav Shpilevoy
2020-03-19 19:19 ` Igor Munkin
2020-04-01 11:33 ` Igor Munkin
2020-04-02 7:35 ` lvasiliev
2020-04-02 15:34 ` Kirill Yukhin
2020-04-09 1:00 ` Alexander Turenko
2020-04-04 18:40 ` Vladislav Shpilevoy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox