[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:33:48 UTC 2021


> And we need to define if the body expansion should use the same macro level or not. I.e. if how %define in the body should work.

Any thoughts on that? My gut feeling says %foreach should simply give identical results to doing the same manually, but if that misses some useful case...

On a somewhat related note, I suspect some would expect to be able to use parametric macro as the second `%foreach` argument, which currently doesn't give particularly meaningful results:

> [pmatilai🎩︎localhost rpm]$ ./rpm --define "dofoo >%{1}<" --define "iter hello world %{quote:good bye}" --eval "%{foreach iter %dofoo}"
>hello<>world<>good bye<
[pmatilai🎩︎localhost rpm]$ ./rpm --define "dofoo() >%{1}<" --define "iter hello world %{quote:good bye}" --eval "%{foreach iter %dofoo}"
>%{1}<>%{1}<>%{1}<


-- 
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-976331807
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20211123/d9171a54/attachment-0001.html>


More information about the Rpm-maint mailing list