[Rpm-maint] [rpm-software-management/rpm] Add substring macro to expose lua's string.sub function (PR #2179)

Carl George notifications at github.com
Wed Sep 14 21:10:18 UTC 2022


Sorry to keep bothering, but `%sub(-) %{lua:print(string.sub(arg[1], arg[2], arg[3]))}` doesn't seem to work on el7/el8/el9.

```
[root at rhel7-container:~]# rpm -E '%{sub foobar 1 3}'
error: Unknown option error: lua script failed: [string "<lua>"]:1: attempt to index global 'arg' (a nil value)
```
```
[root at rhel8-container:~]# rpm -E '%{sub foobar 1 3}'
error: Unknown option 
```
```
[root at rhel9-container:~]# rpm -E '%{sub foobar 1 3}'
error: Unknown option 
```

Got any tips for getting this working for `epel-rpm-macros`?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2179#issuecomment-1247305724
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2179/c1247305724 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220914/cf94bfea/attachment-0001.html>


More information about the Rpm-maint mailing list