Mailinglist Archive: opensuse-buildservice (306 mails)

< Previous Next >
Re: [opensuse-buildservice] conditions in prjconf meta
  • From: Iain Arnell <iarnell@xxxxxxxxx>
  • Date: Thu, 10 Jun 2010 20:15:07 +0200
  • Message-id: <AANLkTilk_6ZM1HXxt8qWE6FTYDgiZxVrKzdJrn_fcQHS@xxxxxxxxxxxxxx>
Gah! Why doesn't the list set reply-to headers?

On Thu, Jun 10, 2010 at 6:39 PM, Dominique Leuenberger
<Dominique.Leuenberger@xxxxxxxxxxxxx> wrote:
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).

I've never bothered with the || - just concatenating a bunch of macros
works fine

%if 0%{?fedora}%{?rhel_version}%{?centos_version}
Substitute: susename redhatname
%endif


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


Yeah, %if doesn't seem to work in Macros section. I ended up once with
things like

%define simplemode %{?fedora:1}%{!?fedora:0}

or nastier,

%define what_is_this
%{?suse_version:its_suse}%{!?suse_version:%{?fedora:its_fedora}%{!?fedora:its_something_else}}



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

Maybe

%define py_requires %{!?suse_version:whatever the py_requires needs to be}


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

< Previous Next >