summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-03-09 21:09:23 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-03-09 21:09:23 +0000
commit537bd969260549c00b33bd8eda3531b885456944 (patch)
tree3259ffc3eaac973b4fafaacf7389a5b6fb655b7a /eclass/mysql.eclass
parentSymlink patches instead of moving them. (diff)
downloadgentoo-2-537bd969260549c00b33bd8eda3531b885456944.tar.gz
gentoo-2-537bd969260549c00b33bd8eda3531b885456944.tar.bz2
gentoo-2-537bd969260549c00b33bd8eda3531b885456944.zip
Catch failures of the mysql_install_db call.
Diffstat (limited to 'eclass/mysql.eclass')
-rw-r--r--eclass/mysql.eclass8
1 files changed, 6 insertions, 2 deletions
diff --git a/eclass/mysql.eclass b/eclass/mysql.eclass
index 1caf5e6fafc9..6cdfce6ba194 100644
--- a/eclass/mysql.eclass
+++ b/eclass/mysql.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.84 2008/01/16 04:01:14 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.85 2008/03/09 21:09:23 robbat2 Exp $
# Author: Francesco Riosa (Retired) <vivo@gentoo.org>
# Maintainer: Luca Longinotti <chtekk@gentoo.org>
@@ -821,7 +821,11 @@ mysql_pkg_config() {
help_tables="${TMPDIR}/fill_help_tables.sql"
pushd "${TMPDIR}" &>/dev/null
- "${ROOT}/usr/bin/mysql_install_db" | grep -B5 -A999 -i "ERROR"
+ "${ROOT}/usr/bin/mysql_install_db" >"${TMPDIR}"/mysql_install_db.log 2>&1
+ if [ $? -ne 0 ]; then
+ grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
+ die "Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
+ fi
popd &>/dev/null
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|| die "MySQL databases not installed"