On Wed 23 Nov 2011 23:21:25 NZDT +1300, Ludwig Nussel wrote:
Yeah, OBS can't expand %() for obvious reasons.
The "obvious" reasons are, that * When building a package, the source server employs a virtual machine, and %() shell expansions are honored. * But when we evaluate BuildRequires, the source server does not employ a virtual machine, and %() shell expansions are disabled for security reasons.
Not only that. It wouldn't make sense. BuildRequires are evaluated on the host system because BuildRequires define what's required to install the target system in the first place. So common constructs like %(rpm -q something) would run on the host which yields no useful result even if the execution could be made secure.
I understand that as evaluating buildrequires on the host system being a bug in the build system.
The solution is to use macros in the prjconf to define the properties of the target system.
And for obvious reasons I'm not interested in doing that for something like this %if 0%(vs="%{vers}"; test ${vs:0:3} = 4.5 && echo 1) which clearly some computer should be doing for me. I am open for any other ways doing this with just macros though. Thanks, Volker -- Volker Kuhlmann http://volker.dnsalias.net/ Please do not CC list postings to me. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org