[Rpm-maint] [rpm-software-management/rpm] RFE: Lua rpm.error() function (#1218)
Panu Matilainen
notifications at github.com
Fri Sep 25 11:22:37 UTC 2020
Actually, it's not so straightforward.
rpm.error() seems like an obvious thing at first sight, but this only signals a *macro error* and not all Lua content in rpm are macros. Notably, scriptlets are not macros, and signaling a macro error in a scriptlet would be pointless.
While it technically would be possible to offer different functionality to Lua based on the context and might at some point do so for something, in this case I think it's better to simply use Lua's own error() which will correctly signal an error to rpm regardless of the context: inside a macro, it will flag the macro expansion as failed (like %{error:foo} does) and in scriptlets, it'll cause the scriptlet to fail.
--
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/1218#issuecomment-698874986
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200925/dc3a5ba7/attachment-0001.html>
More information about the Rpm-maint
mailing list