Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-03-02 Thread Panu Matilainen
Okay, this is not going to go anywhere without further infrastructure improvements in the rpmlua department. Opened an RFE ticket to be handled later and closing this one, thanks for the feedback everybody. -- You are receiving this because you are subscribed to this thread. Reply to this

Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-03-02 Thread Panu Matilainen
Closed #1063. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1063#event-3087565056___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-02-25 Thread Panu Matilainen
(I'm really having a strange week with accidentally closing stuff when intending to comment or cancel... :roll_eyes: ) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-02-25 Thread Panu Matilainen
Reopened #1063. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1063#event-3069978068___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-02-25 Thread Panu Matilainen
Closed #1063. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1063#event-3069975156___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-02-25 Thread Panu Matilainen
Ookkay, looks like the global "arg" convention used in rpm is a leftover from olden days of Lua to work around lack of proper support for variadic arguments. More than one way to do this, feedback on what people actually want would be welcome. Possibilities include (but not limited to): 1) pass

Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-02-25 Thread Panu Matilainen
Yeah that'd would need to be sorted out before an alleged merge. However this is back to the drawing board until we find a way to make the arg table local within callers. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-02-25 Thread Michael Schroeder
I must admit I liked the old implementation better as it didn't do the lua setup if it is not needed by some lua macro. I.e. it had a more lazy approach. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-02-24 Thread Panu Matilainen
Adding options as another table, accessed via option name as the key isn't hard. BUT. This uses global tables for local arguments, which means that such macros could not nest, which seems like a bit of a showstopper... -- You are receiving this because you are subscribed to this thread. Reply

Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-02-24 Thread Panu Matilainen
Pushed a saner implementation of the thing, but options not done yet. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-02-24 Thread Panu Matilainen
Yup, like already noted in the above, "if we do this then we'd really want to export options natively to Lua too". -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-02-20 Thread nim-nim
That would definitely be useful, thanks for looking at it! Can you extend the concept to macro arguments please? My macro files are full of: ```lua local processall = (rpm.expand("%{-a}") ~= "") and (rpm.expand("%{-z}") == "") localverbose = (rpm.expand("%{-v}") ~= "") -- You are

Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-02-12 Thread Panu Matilainen
Okay, at least someone thinks this would be useful, so I guess it makes it worth pursuing :slightly_smiling_face: The implementation here is a icky and slow as it has to go backwards and out of its way to reconstruct what grabArgs() had readily available, probably grabArgs() just needs to

Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-02-11 Thread Jason Tibbitts
Oh, this would be so great. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1063#issuecomment-585008636___ Rpm-maint mailing

Re: [Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-02-11 Thread Panu Matilainen
RFC only for now: if we do this then we'd really want to export options natively to Lua too, and probably some other stuff too. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

[Rpm-maint] [rpm-software-management/rpm] Make parametric macro arguments available as native Lua table (#1063)

2020-02-11 Thread Panu Matilainen
Accessing macro arguments via rpm.expand(%1) etc is tedious, non-intuitive and subject to all sorts of expansion issues. Make the argument macros available as a native Lua table (named arg for consistency with -p lua scriptlet arguments) with their literal values - the arguments are already