Mailinglist Archive: opensuse-packaging (129 mails)

< Previous Next >
Re: [opensuse-packaging] RPM require version range

Am Montag, 4. Januar 2016 schrieb Adrian Schröter:
On Monday 04 January 2016, 07:41:16 wrote Ferdinand Thiessen:
How do I require a version range?
E.g. I need lua 5.2.x I tried:

BuildRequires: Lua(devel) >= 5.2, Lua(devel) < 5.3

But this will fail with a "Have choice" error, so rpm / buildservice
finds lua 5.1 and lua 5.2 for BuildRequire " Lua(devel) < 5.3". So
does not combine the two statements.

I would go this way:

BuildRequires: lua >= 5.2
Conflicts: lua <5.2

I'm afraid that doesn't match Ferdinand's goal - he was asking for 5.2.x
and wants to exclude 5.3 or newer. (No idea why he doesn't want 5.3, but
that's a different topic.)

Basically I see two ways:

a) use two BuildRequires:

BuildRequires: Lua(devel) >= 5.2
BuildRequires: Lua(devel) < 5.3

b) check if one of the --provides of lua-devel contains something

# rpm -q lua-devel

# rpm -q --provides lua-devel
Lua(devel) = 5.3
config(lua-devel) = 5.3.1-3.2
lua-devel = 5.3.1-3.2
lua-devel(x86-64) = 5.3.1-3.2
pkgconfig(lua) = 5.3.1

So at least for 5.3.1, it seems "Lua(devel)" doesn't include the .1, so
you can probably just use
BuildRequires: Lua(devel) = 5.2
(check rpm -q --provides of the 5.2.x lua-devel to be really sure)


Christian Boltz
"Anybody who really thinks /bin/true should report a version number
and a help string (or even a copyright notice) needs to get his head
examined." [Linus Torvalds]

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

< Previous Next >
Follow Ups