Mailinglist Archive: opensuse-buildservice (306 mails)

< Previous Next >
[opensuse-buildservice] conditions in prjconf meta
  • From: "Dominique Leuenberger" <Dominique.Leuenberger@xxxxxxxxxxxxx>
  • Date: Thu, 10 Jun 2010 18:39:23 +0200
  • Message-id: <4C11315B0200002900098657@xxxxxxxxxxxxxxxxxxx>
Hi BS hackers,

I have two issues which I tried to solve with prjconf updates in a 'downstream'
project (so not on distribution level).
One is for some additional Substitutes of names between openSUSE and others
(which often have it similiar, due to equal roots).

So I tried to do something like:

%if 0%{?fedora_version} || 0%{?rhel_version} || 0{?centos_version}
Substitute: openSUSEName OtherName
%endif

this construct seems never to evaluate true if the fedora_version is not set
(so || seems not to be evaluated correctly).

The second issue I had was with Macros: I tried to make Macros based on the
distribution, so something like:

Macros:

%if 0%{?fedora_version}
%define simplemode 1
%endif

But this results in %if can't be defined or other strange errors.

also this did not work:

%if 0%{?fedora_version}
Macros:
%define simplemode 1
%endif

A usecase here was that I wanted to %define %py_requires for Fedora and other's
that don't know about it.

Looking forward for pointers!
Dominique
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups