Hello, I have experienced this while installing MariaDB for testing on my desktop : Latests packages of dev-db/mariadb pulls dev-db/mysql-init-scripts which pulls dev-db/mysql-connector-c as dependency which looks to be required only for the /etc/init.d/mysql script (eg : my_print_defaults --defaults-file="$1" mysqld server mariadb | sed -n -e "s/^--$2=//p" line). How can this justify the download of a 258 Mb packaged (provided by Oracle..?) ? I have removed the mysql-connector-c from RDDEPEND and modified (quickly) the init script as below : - my_print_defaults --defaults-file="$1" mysqld server mariadb | - sed -n -e "s/^--$2=//p" + echo `grep ^$2 $1| sed "s/^.*\ //"` @@ - "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null + "`whereis -b mysqld|sed s/^.*\ //`" --defaults-file="${my_cnf}" --help --verbose > /dev/null This can of course be improved. Shouldn't mysql-init-script be modified and handles an USE="mariadb" to fix this dependency ? I can't say for other more complexes configurations but it works fine here with the quick fix above. Best Regards. Reproducible: Always
Created attachment 630430 [details, diff] init script patch
Created attachment 630432 [details, diff] ebuild mysql-init-scripts patch
Actually my_print_defaults is provided by dev-db/mariadb and located in /usr/libexec/mariadb/my_print_defaults mysqld server mariadb So the only difference in init script should be a location of my_print_defaults.
In Gentoo, each mysqld has been patched to build without 'client libs and tools' and we consider my_print_defaults to be part of this set (for current stable mariadb-10.4.x see https://github.com/Whissi/gentoo-mariadb/commit/d8a70f073f1bd1842f3d60c236358b190576f06f#diff-d690fe9ab4c0af9f6c178e95db9e242b819ec7791aebadf88ebae0aaa3cc05a6R49). Therefore the only valid and supported provider for my_print_defaults in Gentoo is dev-db/mysql-connector-c. Please also note that MariaDB's my_print_defaults has diverged from original MySQL implementation (https://jira.mariadb.org/browse/MDEV-22659?focusedCommentId=167117#comment-167117) so we stick to the version which is supported everywhere.
Well, for me it doesn't make any sense to have mysql-connector-c and mariadb-connector-c because of tools. Should't it be a separate package mysql-tools (possible virtual) or something like that?
You only have a copy of my_print_defaults in /usr/libexec at all because of compatibility with galera. Please read more about the difference between the two mysql client lib providers and why we did the split, https://archives.gentoo.org/gentoo-dev/message/63351418568891b35409035d9bfc8f6a Because my_print_defaults from MariaDB has diverged and is no longer 100% compatible with dev-db/{mysql,percona-server}, it wouldn't be a valid virtual.
Thank you for clarification. I've got the point about the library, so, I see why only two packages in my system depends on mariadb-connector-c and most of the packages depends on mysql-connector-c. But, I don't really get about tools. Since each MySQL implementation has it's own tools version, and this versions partially compatible, why we need to use tools from "vanilla" MySQL with MariaDB or Percona? Wouldn't it be safer to use the same tools implementation with the server installed?
'Safer' is a tough word. I don't know what future will bring us. Given that MariaDB is already diverging my_print_defaults... who knows. On the other hand they released an 'emergency' update (https://mariadb.org/mariadb-10-5-8-10-4-17-10-3-27-and-10-2-36-now-available/) when they accidentally broke normal interface with common tools. For now I hope that our plan was correct and will work for some time. Keep in mind that I am also the only one left in Gentoo's mysql project for now and I really don't want to maintain multiple different tools provider just because you can. This is Gentoo. If you care that much, you also have to opportunity to fork dev-db/mysql-init-scripts in your own overlay and make it work with just dev-db/mariadb (don't forget about things like logrotate). However, it is not guaranteed that /usr/libexec will stay.
Sure I can. And that's one of the reasons I'm using Gentoo since 2004. And I really appreciate what all maintainers do all of these years. I just want to understand what's going on and why.