This seems like a simple question, but the docs don’t seem to have anything to say on the subject. I would like to do something like Requires: vim or emacs but when I do that, I in fact depend on vim, or and emacs. What is the syntax for depending on one or another of two packages?
This seems like a simple question, but the docs don’t seem to have anything
Share
The standard way to do this is via virtual provides: the providing RPMs each state that they provide a virtual package, and the dependent RPM requires that virtual package. So, in your example,
vimandemacsbothProvides: text-editor, and your package wouldRequires: text-editor.If the packages that you’re depending on don’t provide an appropriate virtual package, you could probably hack around this by making up your own. Make dummy
my-package-vim-modeandmy-package-emacs-modeRPMs thatRequires: vimandRequires: emacs, respectively, andProvides: my-package-text-editor, then have your packageRequires: my-package-text-editor.