[Rpm-maint] [rpm-software-management/rpm] Question: the way to check if "load" macro is built-in in a spec file (#1104)

Jun Aruga notifications at github.com
Fri Apr 17 16:17:06 UTC 2020


I tried following code in the `ruby.spec`.
But is there a way to check if the `load` builtin macro exists?
The part `%{defined load}` in the following code fails with `error: /home/jaruga/git/rh-packages/scl/rh-ruby27/ruby/ruby.spec: line 99: failed to load macro file 0`.

```
if %{defined load}
%{?load:%{SOURCE4}}
%{?load:%{SOURCE5}}
%else
%include %{SOURCE100}
%{load %{SOURCE4}}
%{load %{SOURCE5}}
%endif
```

Or is there a macro to check the used rpm version is >= 4.12.0 or not?

https://rpm.org/user_doc/macros.html
> %{load:...}         load a macro file (in >= 4.12.0)


-- 
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/1104#issuecomment-615336072
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200417/0c052d57/attachment.html>


More information about the Rpm-maint mailing list