From 21601c9024da5100fd09d3cda0edf0873570c3fd Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sun, 9 Mar 2008 21:09:23 +0000 Subject: [PATCH] Catch failures of the mysql_install_db call. --- eclass/mysql.eclass | 8 ++++++-- 1 file 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) # Maintainer: Luca Longinotti @@ -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" -- 2.26.2