Not sure is we can do anything with this, probably best way is to report issue upstream and patch mysql to ignore hidden files in directories included with `!includedir` directive. It may be a good idea to add at least ewarn into ebuild, to notify users how important is to merge configs before restarting mysql after upgrade.
One way to avoid this, and the intended method of configuration, is to *not* change the package installed files. Instead, change the settings in a later file that portage does not know about. Items in a later file alphabetically will overwrite previous entries of the same type.
(In reply to Brian Evans from comment #1) > One way to avoid this, and the intended method of configuration, is to *not* > change the package installed files. > > Instead, change the settings in a later file that portage does not know > about. Well, this is a good advice, sad it's impossible to apply in case of mysql - just because it's developers choose to be clever. My specific use case is related to "log-error" option in /etc/mysql/mysql.d/50-distro-server.cnf - only way to redirect mysql logs to stdout (needed because I use runit and wanna collect logs from service's stdout, just like in all other services, and then handle logs using svlogs, with same filtering/rotation as with all other services) is to⦠DO NOT HAVE "log-error" option. No way to work around this when it set to any, including empty or /dev/stdout or similar values. Since 5.7 - in 5.6 there was a way around this. So, I had to comment out "log-error" line in package installed config file. But created ._cfg0000* has added this option back.