[Rpm-maint] [rpm-software-management/rpm] Implement %foreach builtin to iterate over arguments (PR #1828)

Panu Matilainen notifications at github.com
Tue Nov 23 09:56:50 UTC 2021


Oh, right, you need to "call" the macro yourself, which is the way it should be, to pass options and all. So that does work, and so does

> ./rpm --define "dofoo() >%{1}<" --define "iter hello world %{quote:good bye}" --eval "%{foreach iter %dofoo %1}"

I suppose the catch with %1 there is that automatic macros are only looked up on the same level (but didn't look/think too closely, haven't slept enough for that). Perhaps this is simply a matter of documentation - which btw is missing in this PR, please add that.

-- 
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/pull/1828#issuecomment-976353383
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20211123/a8bcde77/attachment.html>


More information about the Rpm-maint mailing list