[arch-commits] Commit in mysql/trunk (PKGBUILD mysql.install)

Bartłomiej Piotrowski bpiotrowski at nymeria.archlinux.org
Mon Feb 25 17:58:08 UTC 2013


    Date: Monday, February 25, 2013 @ 18:58:07
  Author: bpiotrowski
Revision: 178604

upgpkg: mysql 5.5.30-6

- check if my_print_defaults is available
- pass $datadir to mysql_install_db

Modified:
  mysql/trunk/PKGBUILD
  mysql/trunk/mysql.install

---------------+
 PKGBUILD      |    2 +-
 mysql.install |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-02-25 17:50:13 UTC (rev 178603)
+++ PKGBUILD	2013-02-25 17:58:07 UTC (rev 178604)
@@ -5,7 +5,7 @@
 pkgbase=mysql
 pkgname=('libmysqlclient' 'mysql-clients' 'mysql')
 pkgver=5.5.30
-pkgrel=5
+pkgrel=6
 arch=('i686' 'x86_64')
 license=('GPL')
 url="https://www.mysql.com/products/community/"

Modified: mysql.install
===================================================================
--- mysql.install	2013-02-25 17:50:13 UTC (rev 178603)
+++ mysql.install	2013-02-25 17:58:07 UTC (rev 178604)
@@ -1,4 +1,6 @@
-datadir=$(my_print_defaults mysqld | sed -n "s/^--datadir=//p")
+if [[ $(command -v my_print_defaults >/dev/null 2>&1) ]]; then
+  datadir=$(my_print_defaults mysqld | sed -n "s/^--datadir=//p")
+fi
 [[ -z $datadir ]] && datadir=/var/lib/mysql 
 
 post_install(){
@@ -7,7 +9,7 @@
 
   if [[ ! -e $datadir ]]; then
     install -dm700 $datadir
-    usr/bin/mysql_install_db --user=mysql --basedir=/usr
+    usr/bin/mysql_install_db --user=mysql --basedir=/usr --datadir=$datadir
     chown -R mysql:mysql var/lib/mysql &>/dev/null
   fi
 




More information about the arch-commits mailing list