rpm-software-management/rpm-web

rpm.org documentation does not cover conditional macro syntax

pmatilai opened this issue · 3 comments

(originally reported at https://bugzilla.redhat.com/show_bug.cgi?id=1513292):

I recently came across a package that had a macro expansion of the form %{?foo:1}. I couldn't find this documented at http://rpm.org/user_doc/macros.html . Actually, even the form %{?foo} is not defined there. Eventually I found http://backreference.org/2011/09/17/some-tips-on-rpm-conditional-macros/ which explains the syntax, as well as another form %{!?foo:1}. These should both be documented.

Actually, I didn't even know you could do %{!?foo:<stuff>}, that's pretty handy...

Almost two years later, this is still valid. Why isn't this documented? I'm hesitant to use this syntax in my own spec files due to it not being documented.

Another forgotten rpm-web ticket. This was fixed some years ago...
https://rpm-software-management.github.io/rpm/manual/macros.html