[Groonga-mysql-commit] mroonga/mroonga at e7e7815 [master] rpm: simplify

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Thu May 8 15:51:35 JST 2014


Kouhei Sutou	2014-05-08 15:51:35 +0900 (Thu, 08 May 2014)

  New Revision: e7e7815467838bce8071fc1433fc757ffb0d5a24
  https://github.com/mroonga/mroonga/commit/e7e7815467838bce8071fc1433fc757ffb0d5a24

  Message:
    rpm: simplify

  Modified files:
    packages/rpm/centos/mysql-mroonga.spec.in
    packages/rpm/centos/mysql55-mroonga.spec.in
    packages/rpm/fedora/mariadb-mroonga.spec.in
    packages/rpm/fedora/mysql-mroonga.spec.in

  Modified: packages/rpm/centos/mysql-mroonga.spec.in (+3 -3)
===================================================================
--- packages/rpm/centos/mysql-mroonga.spec.in    2014-05-08 15:45:59 +0900 (21875c1)
+++ packages/rpm/centos/mysql-mroonga.spec.in    2014-05-08 15:51:35 +0900 (34ae785)
@@ -122,9 +122,9 @@ mv $RPM_BUILD_ROOT%{_datadir}/doc/mroonga/ mysql-mroonga-doc/
 rm -rf $RPM_BUILD_ROOT
 
 %post
-password_option=""
-mysql -u root -e "quit"
-if [ $? -ne 0 ]; then
+if /usr/bin/mysql -u root -e "quit"; then
+    password_option=""
+else
     password_option="-p"
 fi
 current_version=0

  Modified: packages/rpm/centos/mysql55-mroonga.spec.in (+3 -3)
===================================================================
--- packages/rpm/centos/mysql55-mroonga.spec.in    2014-05-08 15:45:59 +0900 (664dfad)
+++ packages/rpm/centos/mysql55-mroonga.spec.in    2014-05-08 15:51:35 +0900 (193733d)
@@ -137,9 +137,9 @@ eval $command || \
 %preun
 uninstall_sql=%{_datadir}/mroonga/uninstall.sql
 mysql_command=`scl enable mysql55 'which mysql'`
-password_option=""
-$mysql_command -u root -e "quit"
-if [ $? -ne 0 ]; then
+if $mysql_command -u root -e "quit"; then
+    password_option=""
+else
     password_option="-p"
 fi
 if [ "$1" = 0 ]; then

  Modified: packages/rpm/fedora/mariadb-mroonga.spec.in (+3 -3)
===================================================================
--- packages/rpm/fedora/mariadb-mroonga.spec.in    2014-05-08 15:45:59 +0900 (7166b85)
+++ packages/rpm/fedora/mariadb-mroonga.spec.in    2014-05-08 15:51:35 +0900 (7f78144)
@@ -70,9 +70,9 @@ mv $RPM_BUILD_ROOT%{_datadir}/doc/mroonga/ mariadb-mroonga-doc/
 rm -rf $RPM_BUILD_ROOT
 
 %post
-password_option=""
-mysql -u root -e "quit"
-if [ $? -ne 0 ]; then
+if /usr/bin/mysql -u root -e "quit"; then
+    password_option=""
+else
     password_option="-p"
 fi
 current_version=0

  Modified: packages/rpm/fedora/mysql-mroonga.spec.in (+3 -3)
===================================================================
--- packages/rpm/fedora/mysql-mroonga.spec.in    2014-05-08 15:45:59 +0900 (e73382c)
+++ packages/rpm/fedora/mysql-mroonga.spec.in    2014-05-08 15:51:35 +0900 (183ad3d)
@@ -68,9 +68,9 @@ mv $RPM_BUILD_ROOT%{_datadir}/doc/mroonga/ mysql-mroonga-doc/
 rm -rf $RPM_BUILD_ROOT
 
 %post
-password_option=""
-mysql -u root -e "quit"
-if [ $? -ne 0 ]; then
+if /usr/bin/mysql -u root -e "quit"; then
+    password_option=""
+else
     password_option="-p"
 fi
 current_version=0
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-mysql-commit mailing list
Zurück zum Archiv-Index