[Rpm-maint] [rpm-software-management/rpm] Discussion: spec tag order and side-effects (#1161)

nim-nim notifications at github.com
Sat Apr 4 14:09:20 UTC 2020


> I tend to be of the opinion that this is to be expected, you need to define values before you can use it,
> But all this does raise questions about the allegedly free order of spec tags (and sections). Clearly it never was entirely free due to side-effects such as the above, but it for many/most purposes it does appear that way. 

Thinking about it some more, it is a mistake to evaluate SRPM-related tags at the point they occur and not at the end of the section (It may also be a mistake to evaluate RPM-related tags, but scoping for subpackages is quite under-defined and I’ve been known to complain about this :) ).

First, because Tags and macros/variables are supposed to behave the same (maximum rpm calls %description a tag, for example).

And second, because macros/variables do support delayed evaluation. The rpm language is not a programming language where you need to define things before you use them. That’s the whole difference between `%{foo}` and `%{?foo}`. It exists so `%{foo}` can be referenced before it is defined, and only be evaluated at the last moment. And the last moment for SRPM construction is before `%prep`, not at the point the Tag is declared.

> Thoughts, comments, rotten tomatoes...?

🍅 🥚  🍅  🍅  🍅


-- 
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/1161#issuecomment-609034089
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200404/8a439ba4/attachment.html>


More information about the Rpm-maint mailing list