Requires: one OR another package

Hi

I am doing some minor enhancements on mjpg-streamer. The wrapper script to start it in the GUI now accepts ‘kdialog’ or ‘zenity’ whichever is available. What can I do in the .spec file to force the dependency on either one? Or even better: when the GUI is GNOME then we require zenity and for KDE it’s kdialog.

Reason: a user having installed GNOME will probably have zenity. There is no need to load kdialog.

Is this possible?

I think DEB can do this. But no, RPM can’t.
You would need to require a virtual package (e.g. “shell-dialog”) and make both kdialog and zenity provide it.

Thank you. That’s brilliant, and - the longer I think about it - it’s even logical. Well, I learnt something, and I think that I will require kdialog, which is much better.