[Rpm-maint] [rpm-software-management/rpm] RFE: optional one-shot/cached macro expansion (#1155)

Michael Schroeder notifications at github.com
Wed Apr 15 17:19:41 UTC 2020


Well, we don't need to allow %global.

Anyway, let's move a step back and talk about this issue. This is about one shot macros. Implementation wise this is not hard, it's more a question of syntax.

It would be nice to have the following options:
- literal: do not expand the macro when using it
- global: put macro in global namespace
- expand: expand macro right away
- once: cache expanded macro (this issue)

So %global is %define plus the global + expand flags.

Macro names can't start with a `-`, so we could make use normal options:
```
%global foo bar
%define -g -x foo bar
```

As next step can can discuss how we support this in the macro files ;)

-- 
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/issues/1155#issuecomment-614169509
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200415/d0e0908a/attachment.html>


More information about the Rpm-maint mailing list