Since the files contained in the MariaDB rpms conflict with those in the MySQL rpms, this should be reflected in the MariaDB spec files. This will enable yum to handle this at the package level, rather than find out when it tries to install the files.
Ideally, each MariaDB package would "Obsolete" the corresponding MySQL package. This should allow the MariaDB package to be yum/rpm installed on a system with MySQL installed, with yum/rpm automatically removing the MySQL rpm.
This is accomplished by adding an "Obsoletes : " tag to the rpm spec file and listing the package to be replaced in the same way as a "Requires :" tag.