[Rpm-maint] [rpm-software-management/rpm] RFE: optional one-shot/cached macro expansion (#1155)
Panu Matilainen
notifications at github.com
Wed Mar 25 10:53:45 UTC 2026
pmatilai left a comment (rpm-software-management/rpm#1155)
I have a working implementation of this that works by pushing the expansion on top of the original one-shot macro, as a literal macro as that's what I think most users would expect.
I'm just wondering if that should be left for the macro creator afterall, ie `mymacro<o>` would actually keep expanding on each use like the result of a `%global` does, and `mymacro<ol>` would really only expand once. The ability to differentiate seems kinda handy, but then I smell potential for lot of confusion as well.
There are all these related question surrounding `%global` too - does a one-shot macro actually expand twice if defined with `%global`? It seems a bit nuts, but then, one-shot is about the *time of use*, whereas `%global` (and the eventual `%define -e/-x`) are about time of definition. 🤔
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1155#issuecomment-4125563605
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/1155/4125563605 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20260325/311252a5/attachment.htm>
More information about the Rpm-maint
mailing list