Setup.sh renames existing /etc/mysql directory, issue with later package upgrade (debian)

kristian

Verified User
Joined
Nov 4, 2005
Messages
247
Location
Norway
In setup.sh, any existing /etc/mysql is renamed to /etc/mysql.moved.

I have installed a package lldpd that (down the tree) depends on mariadb-common, which owns certain files inside this directory. After running setup.sh, these files are no longer present, and later upgrades of mariadb-common fails with:

Code:
Setting up mariadb-common (1:10.3.29-0+deb10u1) ...
update-alternatives: error: alternative path /etc/mysql/mariadb.cnf doesn't exist
dpkg: error processing package mariadb-common (--configure):
 installed mariadb-common package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 mariadb-common
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

I suspect that this might be an issue for upgrades of mysql-common too, which is a dependency for mariadb-common.

I've had similar problems in the past with packages depending on mail-transport-agent, which was resolved by a da-exim dummy package providing this dependency (ticket #24144 for you DA folks if you're around).

Is a dummy package the best way to resolve this, or is there another approach to consider?
 
Top