Re: Macro expansion problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Michel Salim" <michel.sylvan@xxxxxxxxx> 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

--
Fedora-packaging mailing list
Fedora-packaging@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux