Stealth Rabbi
Stealth Rabbi

Reputation: 10346

RPM Spec file requiring MySQL or MariaDB

I have a spec file that currently requires mysql packages. I now have a requirement to require either mysql or MariaDB. But, I'm not sure how to set up such an OR releationship in my .spec file. I am somewhat familiar with the virtual "Provides" piece, but I am not sure if these mysql and equivilant mariadb packages provide the same thing.

%if 0%{?build6}
Requires        : mysql-server, mysql, ...
%endif

%if 0%{?build7}
Requires        : mysql-community-server, mysql-community-client, ...
%endif

Upvotes: 0

Views: 765

Answers (1)

Etan Reisner
Etan Reisner

Reputation: 80921

RPM Requires entries do not support OR logic. The RPM solution to that problem is "virtual" Provides entries.

You will need to look at the appropriate MySQL and MariaDB packages and compare the list of things they provide and look for something appropriate to Require.

That's the only correct solution possible.

Upvotes: 2

Related Questions