[Rpm-maint] [rpm-software-management/rpm] How to reset the Lua interpreter state (from Python) (Discussion #3357)

Panu Matilainen notifications at github.com
Fri Oct 4 06:08:06 UTC 2024


It's not just Lua state, parsing a spec can and very commonly does change things in the global macro space, and doing another parse without forcing a full reset (rpm.reloadConfig()) can and will yield different results to the point one might call it undefined behavior. 

So no, there's no lighter way to reset the Lua state, you really need to reset the entire state between spec parses, whether the same spec or something else. Of course that the caller needs to do such a thing is a flawed design in rpm. Isolating the entire parse context to the spec struct is something I would love to do but it's a huge job.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/3357#discussioncomment-10840304
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/repo-discussions/3357/comments/10840304 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241003/505b19b4/attachment.html>


More information about the Rpm-maint mailing list