![](https://seccdn.libravatar.org/avatar/9435667f7160374bc34a8600b686aecd.jpg?s=120&d=mm&r=g)
10.07.2020 16:34, Ralf Becker пишет:
What I'm trying to archive is quite simple and on a Debian/Ubuntu it would be:
Requires: nginx || apache2
Require either Nginx or Apache, prefer Nginx unless user already have one of them installed or specified together with my package.
Obviously that can only work on newer RPM distributions supporting boolean dependencies (not CentOS 7 or SLE12 for example).
What I tried so far:
Requires: (nginx >= 1.14 or apache2 >= 2.4)
With and without Recommends or Suggests: nginx
I also tried:
Requires: (nginx >= 1.14 without apache or apache2 >= 2.4 without nginx)
Again with or without recommending or suggesting nginx.
I done more extensive tests on openSUSE Leap 15.1:
- independent of the order in requires, Apache is always preferred (maybe because it's the first in alphabet ...) - recommending Nginx or specifying it together in with package causes both Apache and Nginx to be installed - an already installed Nginx would always install Apache too
Is there a way with rpm / openSUSE or CentOS to archive what I need?
ngnix Provides: http-server apache Provides: http-server Your package Requires: http-server
The package is: https://build.opensuse.org/package/view_file/server:eGroupWare:trunk/egroupw...
I know I could create own conflicting Nginx and Apache packages doing nothing else as requiring the original packages ...
Thanks for any input :)
Ralf