Question: the way to check if "load" macro is built-in in a spec file
Jun Aruga
jaruga at redhat.com
Mon Apr 20 11:57:23 UTC 2020
> I want to call following line conditionally, "if the rpm version is >=
> 4.12.0" or "if the macro with options: "load()" is not defined as
> built-in. For example like this. But it becomes error on the line "%if
> ! %{defined load}".
> Do you have any idea how to fix this?
I would like to inform you that I was able to fix this issue by the
people's help at
https://github.com/rpm-software-management/rpm/issues/1104 .
```
%if "%{load:/dev/null}" == ""
%{?load:%{SOURCE4}}
%{?load:%{SOURCE5}}
%else
%include %{SOURCE100}
%{load %{SOURCE4}}
%{load %{SOURCE5}}
%endif
```
Jun
--
Jun | He - His - Him
More information about the Rpm-list
mailing list