[Fedora-packaging] Macro expansion problem
Rex Dieter
rdieter at math.unl.edu
Tue Aug 26 11:46:50 UTC 2008
Michel Salim wrote:
> At the risk of asking the obvious, why does this fail:
>
> %define nunitver %(gacutil -l nunit.core | tail -n 2 | grep nunit.core
> | cut -d "=" -f 2 | cut -
> d "," -f 1)
>
> Requires: mono(nunit.core) = %{nunitver}
I'll venture because our buildsys needs to (re)generate the srpm, and at
that time, no BR's are installed and gacutil isn't available => failure.
To protect against that, do something like:
%define nunitver %(gacutil -l nunit.core 2>& /dev/null | ...)
%if "x%{?nunitver}" != "x"
Requires: mono(nunit.core) = %{nunitver}
%endif
-- Rex
More information about the Fedora-packaging
mailing list