Thanks.
--
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/1215#issuecomment-821376174___
Rpm-maint mailing list
Rpm-maint@lists.
Closed #1215 via 180afaf3b1a7c5a3b8f31815fde1e398594e22fb.
--
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/1215#event-4604476436___
Would you accept a pull request that that adds a `rpmlua` executable and makes
it behave more or less like my Python script?
Note that my C skills are rusty and my autotools skills are almost nonexistent,
so I will probably need some guidance.
--
You are receiving this because you are subscrib
This gets the job done:
```python
librpm = cdll.LoadLibrary("librpm.so.9")
# Load general configuration (such as macros defined in standard places)
# Second argument is target platform, NULL is the default
librpm.rpmReadConfigFiles(librpm.rpmcliRcfile, None)
```
--
You are receiving this becaus
My script doesn't seem to see system defined macros. Do I need to call
something explicitly to load them?
```
$ rpmlua
RPM Interactive Lua 5.3 Interpreter
> print(rpm.expand("%python3"))
%python3
> rpm.define("test b")
> print(rpm.expand("%test"))
b
>
$ rpm --eval "%{lua:rpm.interactive()}"
Just a word of caution: rpmluaRunScript() and rpmluaRunScriptFile() are not
considered public API and are not available in the public headers on C side,
although the symbols are accessible in the ABI. So they are subject to change
without further notice, although the likelihood of that happening
Wonderfully weird stuff :smile:
--
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/1215#issuecomment-628588855___
Rpm-maint maili
Here is my draft blog post about how to get a nicer console
https://hackmd.io/@hroncok/SyNjuxcqL
--
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/1215#issuecomment-6285861
Adding a native way to flush the output shouldn't be hard. This is code that
for all practical purposes nobody has touched in 16 years so it's not
surprising if its a bit rusty and squeaky...
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or vi
Or if there was a way to flush to the output the content collected by the macro
engine
--
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/1215#issuecomment-628566016___
I think it could be enough if the documentation give more reasonable example
such as:
~~~
rpm.expand("%{echo:some message}")
~~~
Which provides expected output:
~~~
$ rpm --eval "%{lua:rpm.interactive()}"
RPM Interactive Lua 5.3 Interpreter
> rpm.expand("%{echo:some message}")
some message
> r
I meant something a bit more sophisticated. I have so far:
```python
#!/usr/bin/python3
import sys
from ctypes import cdll, c_char_p
librpmio = cdll.LoadLibrary("librpmio.so.9")
adjust_path = b"""
if os.getenv("LUA_PATH") then
package.path = os.getenv("LUA_PATH") .. ";" .. package.path
end
If by "something like the above" you mean something that allows actual
interactive experience, sure :sweat_smile:
--
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/1215#is
I have it all figured out. Blog post coming. Would you consider adding
something like the above to rpm itself?
--
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/1215#issue
Ouch :rofl:
The interactive interpreter was added years before my time, but as far as I can
recall, you're the first person *ever* to try actually using it. There may be
some resident fauna there... :beetle: :bug:
--
You are receiving this because you are subscribed to this thread.
Reply to t
This gets the job done:
```python
from ctypes import cdll, c_char_p
librpmio = cdll.LoadLibrary("librpmio.so.9")
librpmio.rpmluaRunScript(None, c_char_p(b"rpm.interactive()"), None)
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it o
Can I do anything to have the interneter not in the macro expansion mode?
Dne st 13. 5. 2020 11:03 uživatel Michael Schroeder <
notificati...@github.com> napsal:
> This happens because you're in a macro expansion, so all the output is
> collected and returned to the macro engine.
>
> —
> You are
This happens because you're in a macro expansion, so all the output is
collected and returned to the macro engine.
--
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/1215#is
I'd liek to use the interactive Lua console, however, it doesn't seem to be
very... interactive.
```
$ rpm --eval "%{lua:rpm.interactive()}"
RPM Interactive Lua 5.3 Interpreter
>
```
So far so good...
```
> print"a"
>
```
Nothing...
```
> print"a"
> print"a"
> print"a"
> print"a"
>
```
Not
19 matches
Mail list logo