Closing from the perspective of subject: we're not changing %global behavior,
too many things depend on it being the way it is. We do have %{macrobody:...}
now and could also add a macro primitive to declare literal macros, but that's
beyond the scope here I suppose.
--
You are receiving this
Closed #1049.
--
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/1049#event-3183244885___
Rpm-maint mailing list
Started adding a %define/%global -style %literal directive for this using the
new ME_LITERAL flag, but somehow it feels off the mark. I'm wondering if we
should just add options to %define instead to allow finer expansion control
(and make %global an alias to that)
--
You are receiving this
It's mentioned in https://rpm.org/user_doc/macros.html:
> Note that %define and %global differ in more ways than just scope: the body
> of a %define’d macro is lazily expanded (ie when used), but the body of
> %global is expanded at definition time. It’s possible to use %%-escaping to
> force
Oh wow, I knew that %global expands right away when defining the macro, but I
somehow didn't expect that it expands again when the macro is used:
```
$ rpm --eval '
> %define foo
> %global bar
> %foo percent, %bar percent'
%% percent, % percent
```
Is that documented anywhere?
Anyway,