[Rpm-maint] [rpm-software-management/rpm] RFE: pass parametric macro options and arguments to Lua natively (#1092)

Panu Matilainen notifications at github.com
Mon Oct 12 11:59:46 UTC 2020


@nim-nim : 

One shouldn't expect `nil == false` any more than one would expect `"yes" == true`, although both sides *evaluate to* true, ie `("yes" and true)` *is* true. The language documentation is quite explicit about this, and this has wonderfully little to do with rpm or the interface it provides.

Now, there are no clear concise examples provided, so I can only assume some of this confusion comes from expecting rpm.expand() on conditionals to evaluate somehow specially, but such evaluation *is not possible*. Rpm macro expansion is a *string processor* which simply produces a string of zero or more characters according to its own rules (think printf() on steroids), any interpretation of the returned string is solely up to the user. If you expect something else and additionally have misunderstandings about Lua language fundamentals, I'm sure it's going to be a painful experience.  I could've clarified this anytime if you had just asked. Also, adding separate API to return a nice little boolean whether a macro is defined or not was a matter of like 15min of work. All these years and nobody thought to ask for such a simple thing!

I was hoping for some constructive feedback on the newly added things that are intended to help that very case, including discussion about usage scenarios with the specific Lua semantics in mind, but instead I get the same old whining about how everything is awful (which sure gets tiresome after all these years), quite clearly without so much as a glance to look at what's being done to improve things. 

I'm not particularly proud of the blown fuse on Friday, but not everything is rpm's fault.

-- 
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/issues/1092#issuecomment-707076354
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20201012/80020868/attachment-0001.html>


More information about the Rpm-maint mailing list