summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorOtto Kekäläinen <otto@kekalainen.net>2020-12-20 23:13:50 +0200
committerOtto Kekäläinen <otto@kekalainen.net>2021-01-03 21:14:32 +0200
commita3448b2395a4f7aff62f8bab70797a6f928d626f (patch)
treea20f1b1ab2eb658f50e0c0ca6b6ebf3e4686e485 /debian
parentea56841997995283f04e85e957c8d7f3159c85b0 (diff)
downloadmariadb-git-a3448b2395a4f7aff62f8bab70797a6f928d626f.tar.gz
Deb: Fix upgrade from Percona.com by ensuring server uses mariadb.cnf
Upstreamed from https://salsa.debian.org/mariadb-team/mariadb-10.5/-/commit/13e3a7903e5c72e70c02b98a3e51a6de70b9b6ef
Diffstat (limited to 'debian')
-rw-r--r--debian/mariadb-common.postinst12
1 files changed, 12 insertions, 0 deletions
diff --git a/debian/mariadb-common.postinst b/debian/mariadb-common.postinst
index 2a8037e8c48..12f65bd3d92 100644
--- a/debian/mariadb-common.postinst
+++ b/debian/mariadb-common.postinst
@@ -23,6 +23,18 @@ case "$1" in
echo " ln -sf mariadb.cnf /etc/mysql/my.cnf"
fi
fi
+
+ # Note that MySQL in Debian runs the configure-symlinks from the
+ # mysql-server-x.x.postinst and postrm files, while the MySQL.com (and
+ # Percona.com) packaging triggers update-alternatives directly form the
+ # mysql-common (and percona-x-common) package using priority 200.
+ #
+ # Thus, we need to ensure here that mariadb.cnf indeed became the primary
+ # alternative and override with priority 500 if needed.
+ if ! update-alternatives --query my.cnf | grep --quiet "Value: /etc/mysql/mariadb.cnf"
+ then
+ update-alternatives --install /etc/mysql/my.cnf my.cnf "/etc/mysql/mariadb.cnf" 500 || true
+ fi
;;
esac