Hi Alessandro,

On 02-01-2023 14:21, Alessandro Vesely wrote:
please pardon my ignorance about Debian install.  I'm distributing a software which could use various DBMS'es by setting a number of parameters.  Example parameters are only given for MariaDB.  I distribute a debian/ directory that Debian users can use to prepare a package instead of configure, make, make install.  However, the debian/postinst supports MariaDB only.

Do I understand you correctly that you don't want to support MySQL? Or that you don't know how to support both at the same time? Most packages in Debian that are using MariaDB or MySQL can easily support both (hence we have the default-mysql-client and virtual-mysql-client packages), and indeed dbconfig-common treats them as equal.

A user complained that MySQL doesn't work, because it misses the INET6 type that the example settings use.

And is this an absolute must? (It's an example after all?)

Now I've added "mariadb-client | mariadb-server | dbconfig-no-thanks" to the Debian clause in debian/control.

I think that's wrong. At least it would fail to install dbconfig-common in case there is a mariadb-client installed. Also, I wonder about the mariadb-server part. mariadb-server depends on the versioned mariadb-server-* package which depends on the versioned mariadb-client-* package. So in case mariadb-client wouldn't be able to be fulfilled, mariadb-server as the second alternative isn't going to help. And in my opinion you should not depend on the server part. As with most databases, the server part can live on a different host and package should really not force the server to be on the same host.

I'm not clear how I could add an (optional) Conflicts mysql-something, also because I see no mysql-server in the package cache.

mysql-server is available in unstable, but we don't want to support both MySQL and MariaDB in Debian stable at the same time, so currently MySQL is blocked from migration. However, derivatives choose differently (Ubuntu supports MySQL in their releases). As mentioned above, the server part can be on a different host, but ependencies are not able to describe incompatibility with what runs on the other host.

Is there a way to fail if a user chooses to install the DB but MariaDB is missing?  Or is the above enough?

I don't think you can do it with dependencies. If you really want to go this route, you have to detect it during run time.

Paul

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to