[Rpm-maint] [rpm-software-management/rpm] Codify built-in macro argument acceptance (#853)

Panu Matilainen notifications at github.com
Tue Sep 24 06:27:36 UTC 2019

Yup, the thing with g vs gn is that g reflects whether ':' is there or not, and gn reflects whether there's something after it: macros that do not accept arguments must not have g, and macros that do need to have both (but non-zero gn implies non-NULL g).

And yeah, ```%{echo:%{nil}}``` would work and that's perfectly fine. Which is exactly the reason that makes me wonder if empty argument should be permitted for echo, warn and error.

Good point on doFoo() expansion, but note that doFoo() is not the only function of that kind. Perhaps the central check should be only for g (ie ':') and only check for the non-empty argument in the places that actually care. Which probably would leave doOutput() naturally out of the argument checking - making output of empty string does feel kinda wrong.

I'll change that at least to see how it'd look like. Thanks for reviewing!

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190923/7a64eace/attachment.html>

More information about the Rpm-maint mailing list