On debian /var/lib/dpkg/info/percona-server-server.postinst:
case "$1" in
configure)
if [ -z "$2" ];
then
…
else
# If the existing config file is a proper file, we back it up
if [ -f "/etc/mysql/my.cnf" ] && [ ! -L "/etc/mysql/my.cnf" ]; then
cp /etc/mysql/my.cnf /etc/mysql/my.cnf.bak
echo "WARNING: /etc/mysql/my.cnf moved to /etc/mysql/my.cnf.bak"
echo "Please use etc/mysql/mysql.conf.d for any custom configuration settings"
fi
update-alternatives --force --install /etc/mysql/my.cnf my.cnf "/etc/mysql/mysql.cnf" 300
if [ -f "/etc/apparmor.d/usr.sbin.mysqld" ]; then
check_apparmor_files
else
mv -f /etc/apparmor.d/usr.sbin.mysqld.in2 /etc/apparmor.d/usr.sbin.mysqld 2> /dev/null || true
fi
rm -f /etc/apparmor.d/old_apparmor
if aa-status --enabled 2>/dev/null; then
apparmor_parser -r -T -W /etc/apparmor.d/usr.sbin.mysqld 2>/dev/null || true
fi
fi
Which means that debconf:
# Select which my.cnf should be used
# Choices: Use existent my.cnf (RECOMMENDED), Use NEW my.cnf
percona-server-server percona-server-server/existing_config_file select Use existent my.cnf (RECOMMENDED)
isn’t taken into account when doing percona upgrade.
IMHO it’s a bug.
What do you think ?
(I didn’t found the source to provide a PR)