Mailinglist Archive: opensuse-packaging (54 mails)

< Previous Next >
Re: [opensuse-packaging] opensuse / SLE conditional logic?

On 10/06/2016 07:21 AM, Greg Freemyer wrote:
On Wed, Oct 5, 2016 at 4:03 PM, Darin Perusich <darin@xxxxxxxxxx> wrote:
Lots of details on conditionals on the cross distro howto.

Lots of detail, yes. But not enough. :(

My impression is that "is_opensuse" is only defined for Leap 42.1 and
newer (including factory).

There's nothing in either page that tells me that, so I'm in the world
of undocumented features.

At its simplest my question is how to write a conditional such that it
is true for 13.1/13.2/42.1/42.2/Factory, but false for all versions of

My thought was:

%if 0%{?is_opensuse}

but that seems to only be true for 42.1/42.2/Factory.

fyi: This relates to SR#433496 which I think you will be reviewing.
Maybe it needs to be revoked until I figure it out.


Yeah the conditional madness here is pretty crazy you probably want
something like,

%if 0%{?suse_version} && !((!0%{?is_opensuse}) && 0%{?suse_version} == 1315)

Will give you all of openSUSE (although it will also give you
SLE10/SLE11 but not SLE12), the logic is first check that we have a
SUSE/openSUSE version, then check that its not SLE12.

It would be really nice if there was a simpler better way but currently
there is not, By March next year 13.2 will be out of support though and
then is_opensuse will cover all supported openSUSE versions so at this
stage there probably isn't point in doing much else.

* Disclamer, I didn't check that line but have used similar in the past.


Simon Lees (Simotek)

Emergency Update Team
SUSE Linux Adeliade Australia, UTC+9:30
GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B

< Previous Next >
Follow Ups