From b5a439fb1d5244c0f2a4f91b326ec52278997763 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 16 Feb 2011 16:31:18 +0000 Subject: [PATCH] - Try to fix lang config on upgrade. Changed files: mysql.spec -> 1.521 --- mysql.spec | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/mysql.spec b/mysql.spec index b0e7a89..c64417c 100644 --- a/mysql.spec +++ b/mysql.spec @@ -916,6 +916,34 @@ for config in $configs; do done ) | %banner -e %{name}-5.1 +%triggerpostun -- mysql < 5.5.0 +configs="" +for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do + if echo "$config" | grep -q '^/'; then + config_file="$config" + elif [ -f "/etc/%{name}/$config" ]; then + config_file=/etc/%{name}/$config + else + clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf) + if [ -z "$clusterdir" ]; then + echo >&2 "Can't find cluster dir for $config!" + echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf" + exit 1 + fi + config_file="$clusterdir/mysqld.conf" + fi + + if [ ! -f "$config_file" ]; then + echo >&2 "ERROR: Can't find real config file for $config! Please report this (with above errors, if any) to http://bugs.pld-linux.org/" + continue + fi + configs="$configs $config_file" +done + +for config in $configs; do + sed -i -e 's#^language *= *polish#lc-messages = pl_PL#gi' $config +done + %files %defattr(644,root,root,755) %doc build/support-files/*.cnf build/support-files/*.ini -- 2.44.0