I have a breakfast
package that Requires
toast
, bacon
, and eggs
. Importantly, breakfast
needs exactly one eggs
implementation to be a balanced meal.
The scrambled-eggs
package Provides
eggs
. So does the fried-eggs
package. In no circumstance should scrambled-eggs
be installed alongside fried-eggs
, even in the absence of breakfast
.
If there were only two ways to prepare eggs, the solution would be to add Conflicts: fried-eggs
to the scrambled-eggs
package and vice versa. However, there are many ways to prepare eggs, some of which aren't even known yet, and a new way of preparing eggs might not be familiar with all of the other ways to prepare eggs.
Interestingly, it seems that for RPM version 4.11.3, you can make each package have both Provides: eggs
and Conflicts: eggs
, but this behavior does not seem to be documented. In fact, the documentation seems to suggest that it should not work:
Conflicts are basically inverse Requires. If there is a matching package the package cannot be installed. It does not matter whether the Conflict: tag is on the already installed or to be installed package.
Can I rely on the above Provides/Conflicts behavior for future versions of RPM? Or, how else can I solve this problem?