Mailinglist Archive: opensuse-buildservice (266 mails)

< Previous Next >
Re: [opensuse-buildservice] prjconf Prefer: with distribution version check?
On 30/1/2013 at 08:39 PM, Hans-Peter Jansen <hpj@xxxxxxxxx> wrote:
Hi,

I would like to use a prjconf clause like this:

# aaa_base-malloccheck doesn't exist before
%if 0%{?suse_version} < 1220
Prefer: -post-build-checks
%endif

in order to build packages for older systems, that do not have that
malloccheck, without messing with each and every failing .spec..

Unfortunately, that doesn't work.

Any idea on how to archive that?

I think, you can use %_repository here. For example, if you project is building
for openSUSE 12.1 and openSUSE 12.2 with their corresponding repository names
openSUSE_12.1 and openSUSE_12.2, respectively, then you *should* be able to do
this:

%if %_repository == "openSUSE_12.1"
....
%endif

Please note that I haven't tested this. I'm mentioning the above solution from
the way how KIWI builds are handled and hence believe the same technique would
work for you too.

HTH,
Srinidhi.

--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
References