[Rpm-maint] [rpm-software-management/rpm] add support for premacros.d, complementing --predefine (#304)

Jeff Johnson notifications at github.com
Wed Sep 6 18:15:49 UTC 2017


There's another approach to conditionalize macro definitions from configuration by permitting existence tests in the first field.

Most of the usage cases that have been reported to me are based on arch/os/platform, and the selection is being done by putting (some value) of arch in path to select 1-of-N possible configurations.

A macro configuration file looks something like:
`%foo bar`

If, say, there was a namespaced macro '%_arch_x86_64' defined as a side effect of reading /etc/rpm/platform, then the above could be conditionalized to be defined on x86_64 only by abusing the %{?...} syntax:
`%{?_arch_x86_64:foo} bar`

I.e. define '%foo bar' only if the macro _arch_x86_64 is defined.

I'm not sure its worth the effort, partly because everyone is going to want a value rather than an existence test.


-- 
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/304#issuecomment-327569453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170906/e0b26f30/attachment.html>


More information about the Rpm-maint mailing list