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
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
(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:
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
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
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
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:
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:
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
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:
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:
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
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
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
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:
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
16 matches
Mail list logo