[Rpm-maint] [rpm-software-management/rpm] Implement one-shot macro modifier <o> (PR #4169)
Panu Matilainen
notifications at github.com
Mon Apr 20 06:31:32 UTC 2026
@pmatilai commented on this pull request.
> @@ -63,7 +63,17 @@ Macro behavior can be altered by supplying modifiers: (Added: 6.1.0)
_NAME_*<*_MODIFIERS_*>* _BODY_
Supported modifiers are:
-- *l*iteral - macro body is literal, *%* is not processed when expanding
+- *l*: Literal expansion. *%* is not processed when expanding.
+- *o*: One-shot expansion. The macro is expanded on first use and the
+ literal result is pushed on top of the original macro.
I intentionally avoided "replace" because it's ambiguous: does it literally change the original macro definition (I actually had a version of this patch that did just that) or something else? The stacked nature of the macro engine is explained in DESCRIPTION, and understanding that is necessary to understanding this modifier, because you can rearm the expansion by doing an undefine.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4169?email_source=notifications&email_token=ADLPZU2BCJCNTNGVW5RTZQD4WW74JA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMJTG43TEMRVG4YKM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOS6XA4S7OJSXM2LFO5PW433UNFTGSY3BORUW63TTL5RWY2LDNM#discussion_r3108677885
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/4169/review/4137722570 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20260419/a6db28b1/attachment.htm>
More information about the Rpm-maint
mailing list