Author: arekm                        Date: Wed Feb 16 16:31:23 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- Try to fix lang config on upgrade.

---- Files affected:
packages/mysql:
   mysql.spec (1.520 -> 1.521) 

---- Diffs:

================================================================
Index: packages/mysql/mysql.spec
diff -u packages/mysql/mysql.spec:1.520 packages/mysql/mysql.spec:1.521
--- packages/mysql/mysql.spec:1.520     Mon Jan 31 09:46:34 2011
+++ packages/mysql/mysql.spec   Wed Feb 16 17:31:18 2011
@@ -917,6 +917,34 @@
 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
@@ -1187,6 +1215,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.521  2011/02/16 16:31:18  arekm
+- Try to fix lang config on upgrade.
+
 Revision 1.520  2011/01/31 08:46:34  arekm
 - rm test suite
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mysql/mysql.spec?r1=1.520&r2=1.521&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to