SPECS: mysql.spec - fix mysql 4.1.1 migration trigger where one ha...

glen glen at pld-linux.org
Mon Jul 18 15:27:31 CEST 2005


Author: glen                         Date: Mon Jul 18 13:27:31 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- fix mysql 4.1.1 migration trigger where one has leading space in cluster definition

---- Files affected:
SPECS:
   mysql.spec (1.288 -> 1.289) 

---- Diffs:

================================================================
Index: SPECS/mysql.spec
diff -u SPECS/mysql.spec:1.288 SPECS/mysql.spec:1.289
--- SPECS/mysql.spec:1.288	Sun Jul 10 01:46:40 2005
+++ SPECS/mysql.spec	Mon Jul 18 15:27:26 2005
@@ -25,7 +25,7 @@
 Name:		mysql
 Group:		Applications/Databases
 Version:	4.1.12
-Release:	2
+Release:	2.1
 License:	GPL + MySQL FLOSS Exception
 Source0:	http://mysql.dataphone.se/Downloads/MySQL-4.1/%{name}-%{version}.tar.gz
 # Source0-md5:	56a6f5cacd97ae290e07bbe19f279af1
@@ -671,13 +671,18 @@
 
 %triggerpostun -- mysql <= 4.1.1
 # For better compatibility with prevoius versions:
-for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do
+for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf | xargs); do
 	if echo "$config" | grep -q '^/'; then
 		config_file="$config"
 	elif [ -f "/etc/mysql/$config" ]; then
 		config_file=/etc/mysql/$config
 	else
 		clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf)
+		if [ -z "$clusterdir" ]; then
+			echo >&2 "Can't find cluster dir for $config!"
+			echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf"
+			exit 1
+		fi
 		config_file="$clusterdir/mysqld.conf"
 	fi
 	echo "Adding option old-passwords to config: $config_file"
@@ -859,6 +864,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.289  2005/07/18 13:27:26  glen
+- fix mysql 4.1.1 migration trigger where one has leading space in cluster definition
+
 Revision 1.288  2005/07/09 23:46:40  arekm
 - rel 2
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/mysql.spec?r1=1.288&r2=1.289&f=u




More information about the pld-cvs-commit mailing list