-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rpmlua wrapper command for running our Lua interpreter standalone #1867
Conversation
Sigh, CI acting up once more. Not going to let that spoil my day... |
Being able to run stuff easily in rpm context helps developing and debugging scriptlets and macros too. Supports running one-liner statements from the cli, regular scripts and an interactive session. This is placed into a separate executable for, well, separation and simplicity, but it'll also give us means to link to readline without dragging that to main rpm dependencies (but that's left for later).
Couple of minor details fixed + realized that interactive mode is more useful if it's possible to enter it after executing a script... |
Awesome, thank you! To make ILua work I needed to execute a short snippet and execute a script from the given path. Looking at the code it seems that this is currently not possible to do? I could write a wrapper, but it would be easier if I could run:
|
There you go: 59ef11f I wasn't able to test it with iLua because all that does for me is traceback in slow-motion loop. |
Hmm, just realized another little thing to make it more like |
...and now with readline support too. Suitably silly stuff to work on for the last day before holidays 😁 |
That usually means the provided lua interpreter does not work with it. |
Possibly. I don't grok what iLua tries to do really, but for one rpm overrides package.path to its own location, which may interfere. I've no interest in chasing issues from running Lua through some funky Python wrapper 😅 |
I can definitively try it myself later, but basically what needs to be passed to ILua as
And if that command works as expected, so should ILua. |
It works now with RPM from https://copr.fedorainfracloud.org/coprs/pmatilai/rpm-snapshot/ -- thanks! |
Okay, glad it works for you. For me it (iLua) starts up, but trying to actually do anything there results in this traceback loop. |
With:
I seem to get that as well on rawhide, even with regular Lua. Will report that to iLua upstream. |
Oh, I'm getting (on F35) this instead:
I was about to say "but it works with regular Lua", but then realized it works with rpmlua too if I pass absolute path to -i, I'd always happened to pass a relative path up to now. |
iLua has been fixed on rawhide (Koji repo only for now).
|
Being able to run stuff easily in rpm context helps developing and debugging
scriptlets and macros too. Supports running one-liner statements from
the cli, regular scripts and an interactive session.
This is placed into a separate executable for, well, separation and
simplicity, but it'll also give us means to link to readline without
dragging that to main rpm dependencies (but that's left for later).