On Tue, May 22, 2012 at 9:34 PM, Isaac Hailperin <i.hailperin@heinlein-support.de> wrote:
Hi,
I would like to specify that a package needs either packageA OR packageB. E.g. I want a Database, but don't care if its mysql or postgresql. For debs there is the "|", but I could not find something like this for rpms. Is it just like that?
Isaac
-- Isaac Hailperin
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
in my view and knowledge, not possible, and here're references: http://www.spinics.net/lists/rpm/msg01320.html "it's the long time rpm limitation" actually rpm is designed for "sure" things. you have to make sure all the things are there. you can't "don't care" or "don't know if it's there" then start a build...rpm rejects you. XD. actually in such cases, it means 1. you have to manually choose one (the easiest way) or buildrequires both of them then let the "configure" file "randomly" choose one (most of the times configure isn't able to do this, it'll build them all). 2. or you can buildrequires them both and split two modules/sub-packages like packagename-mysql and packagename-postgresql, and "Recommends" them all. that is, leave the options to users. 3. or use conditional build tags eg "%with_mysql 1" to default build with mysql and leave rebuild possibilities to use postgresql to the users. users can "rpmbuild --rebuild --with_postgresql=1 *.srpm" easily, but you have to build them both to write the correct "%files" list. 4. in some cases, something called virtual packages (Provides) will help a lot. eg: you need gnutls-devel, but actually this package name is virtual, it's provided by libgnutls-extra-devel and libgnutls-devel ( the last does not have such Provides in reality). then rpm build process can start if it find either of them. but in such cases, you have to modify all the "either...or" dependency packages to make them have the same virtual "Provides" name. (I don't know if it's possible, but a theory to override the long time rpm limitations.) hope it helps marguerite -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org