Mailinglist Archive: opensuse-buildservice (257 mails)

< Previous Next >
Re: [opensuse-buildservice] %if wrapped BuildRequires lines
  • From: Marcus Hüwe <suse-tux@xxxxxx>
  • Date: Tue, 31 Oct 2006 19:06:19 +0100
  • Message-id: <20061031180618.GC4079@xxxxxxxxxxxxxxxxxxx>
Hi

On 2006-10-31 17:48:43 +0000, James Ogley wrote:
> Ref: home:Riggwelter/gimp-unstable
>
> I've tried to wrap my BuildRequires lines in a %if statement to verify
> that the SUSE version is recent enough to contain certain packages (in
> this case python-gnome-devel), it looks like this:
>
> %if %suse_version >= 1020
> BuildRequires: foo-devel bar-devel
> %else
> BuildRequires: foo-devel bar
> %endif
>
> This statement should use the first version for FACTORY and the second
> for 10.1, however it seems to ignore the first ans always use the
> second, even on FACTORY.
>
> I'm asking here before filing a bug on bnc just to check that I've got
> the syntax and %suse_version right (the latter seems correct according
> to /usr/lib/rpm/suse_macros)
The syntax is correct but your check is wrong
'echo %suse_version' on factory says "1011"
So replace 1020 with 1011 and it will work :)


Marcus
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
List Navigation
References