On Wed, Apr 12, 2006 at 06:39:37PM +0200, Stefan Gerlach wrote:
When using multiple BuildRequires for different distributions like
------- %if %{suse_version} > 1000 BuildRequires: qt3-devel kdelibs3-devel %endif
%if %{fedora_version} > 1 BuildRequires: qt-devel kdelibs-devel %endif -------
i always get "expansion error" for all distributions. is this a know issue or can this be fixed in any way? The same spec files works without a problem when building outside of the build service.
Yes, I noticed your package ;). The problem is that this is kind of hopeless. There's simply no way for the build service code to deal with macros that call external commands. So if your specfile contains things like %define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0) %define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0) %define fedora_release %(rpm -q --queryformat '%{VERSION}' fedora-release) %define fedora_version %(echo "%fedora_release" | tr -d '.') you're out of luck. Suse already defines a "suse_version" macro which you can use (even in the build service), but it is a bit different from the one you use: it contains an extra digit for "beta" versions. We can define some macros for fedora and the other distributions if they don't have macros like this. Cheers, Michael. -- Michael Schroeder mls@suse.de main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}