"Michel Salim" <michel.sylvan(a)gmail.com> writes:
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'm hardly an expert, but it seems like this is assuming that gacutil
will be installed in *any* context where the specfile is examined,
in particular before any of the specfile's Requires: or BuildRequires:
could be enforced.
(Likewise for tail, grep, and cut, but those at least have some small
prayer of being there in the environment of non-core packages.)
You can get away with this kind of thing in some cases where the macro's
value doesn't really matter before the package is built and/or installed
(I have some packages that do similar things and seem to work). But I'm
thinking a Requires: cannot qualify for that, since it's likely to be
evaluated long before either the package or its dependencies have been
installed.
regards, tom lane