mysql.eclass, in mysql_init_vars, does not parse correctly the my.cnf in use, so it always ends up with datadir=/var/lib/mysql-<mysql-slot>. Also srvdir flag is completely ignored: check for srvdir use flag is in a place in the code which is never reached on first install (my.cnf should exist already), and it's never reached later because datadir now gets hardcoded into my.cnf by pkg_install, and the value is taken from there before even testing srvdir existence. Federico
Created attachment 79280 [details, diff] Patch to solve incorrect detection of datadir and srvdir effectiveness Attached a patch which solve both problems mentioned
Applied, only a comment, add ${ROOT} when using an absolute path in ebuilds. Thanks for the report