HAYASHI Kentaro
null+****@clear*****
Tue Oct 29 11:34:24 JST 2013
HAYASHI Kentaro 2013-10-29 11:34:24 +0900 (Tue, 29 Oct 2013) New Revision: 6e1f3c6fed54d16eb76a669ff0a0a8a7b7ff2b6e https://github.com/mroonga/mroonga/commit/6e1f3c6fed54d16eb76a669ff0a0a8a7b7ff2b6e Message: rpm centos: detect mysql command using scl Modified files: packages/rpm/centos/mysql55-mroonga.spec.in Modified: packages/rpm/centos/mysql55-mroonga.spec.in (+8 -6) =================================================================== --- packages/rpm/centos/mysql55-mroonga.spec.in 2013-10-28 19:15:02 +0900 (66f81bf) +++ packages/rpm/centos/mysql55-mroonga.spec.in 2013-10-29 11:34:24 +0900 (95c79c5) @@ -79,8 +79,9 @@ mv $RPM_BUILD_ROOT%{_datadir}/doc/mroonga/ mysql-mroonga-doc/ rm -rf $RPM_BUILD_ROOT %post +mysql_command=`scl enable mysql55 'which mysql'` password_option="" -mysql -u root -e "quit" +$mysql_command -u root -e "quit" if [ $? -ne 0 ]; then password_option="-p" fi @@ -112,13 +113,13 @@ CREATE FUNCTION mroonga_escape RETURNS STRING SONAME 'ha_mroonga.so'; if [ "$1" = 2 ] ; then if [ $current_version -lt $required_version ]; then sql="$drop_sql$install_sql" - command="/usr/bin/mysql -u root $password_option -e \"$sql\"" + command="$mysql_command -u root $password_option -e \"$sql\"" echo "run the following command after restarting mysql server:"; echo " $command" exit 0 else sql="$drop_sql" - command="/usr/bin/mysql -u root $password_option -e \"$sql\"" + command="$mysql_command -u root $password_option -e \"$sql\"" echo $command eval $command || \ (echo "run the following command to unregister mroonga:"; \ @@ -126,15 +127,16 @@ if [ "$1" = 2 ] ; then fi fi sql="$install_sql" -command="/usr/bin/mysql -u root $password_option -e \"$sql\"" +command="$mysql_command -u root $password_option -e \"$sql\"" echo $command eval $command || \ (echo "run the following command to register mroonga:"; \ echo " $command") %preun +mysql_command=`scl enable mysql55 'which mysql'` password_option="" -mysql -u root -e "quit" +$mysql_command -u root -e "quit" if [ $? -ne 0 ]; then password_option="-p" fi @@ -148,7 +150,7 @@ if [ "$1" = 0 ]; then UNINSTALL PLUGIN mroonga; FLUSH TABLES; " - command="/usr/bin/mysql -u root $password_option -e \"$sql\"" + command="$mysql_command -u root $password_option -e \"$sql\"" echo $command eval $command || \ (echo "run the following command to unregister mroonga:"; \ -------------- next part -------------- HTML����������������������������...Descargar