[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:03 UTC 2026


@pmatilai commented on this pull request.



> @@ -724,7 +734,12 @@ doDefine(rpmMacroBuf mb, const std::string & str, int level, int expandbody, siz
     }
 
     /* Check for modifier compatibility */
-    if (o && (flags & ME_LITERAL)) {
+    if (o && (flags & (ME_LITERAL|ME_ONESHOT))) {
+	rpmMacroBufErr(mb, 1, _("Macro %%%s has incompatible modifiers\n"), n);

Yeah it's not a great error message :sweat_smile: I originally had something different in there, but then realized all the related errors are of the form "Macro ..." and changed this to fit that style - losing some information in the process.

"Parametric macro %s has incompatible modifiers" is a little better but still doesn't quite get it. "Macro %s has modifiers incompatible with parametric macros" is technically correct, just a little repetitive, but then this isn't a beauty contest, informativeness is the important measure :sweat_smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4169?email_source=notifications&email_token=ADLPZU7XQGY7H2ZVIRD3VHD4WW72PA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMJTG43TEMBXG4Z2M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOS6XA4S7OJSXM2LFO5PW433UNFTGSY3BORUW63TTL5RWY2LDNM#discussion_r3108675961
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/4169/review/4137720773 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20260419/39ba91ad/attachment.htm>


More information about the Rpm-maint mailing list