From: Date: January 5 2009 2:11pm Subject: bzr commit into mysql-5.1 branch (jperkin:2706) Bug#41828 List-Archive: http://lists.mysql.com/commits/62477 X-Bug: 41828 Message-Id: <0KD000H9X1ZG82D0@fe-emea-09.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT #At file:///home/sketch/bzr/mysql-5.1-build-bug41828/ based on revid:joerg@stripped 2706 Jonathan Perkin 2009-01-05 bug#41828: mysql_install_db misses mysqld options when using --basedir * pass --languages= to mysqld when using --basedir * improve error messages when unable to find files in basedir modified: scripts/mysql_install_db.sh === modified file 'scripts/mysql_install_db.sh' === modified file 'scripts/mysql_install_db.sh' --- a/scripts/mysql_install_db.sh 2008-09-02 08:53:30 +0000 +++ b/scripts/mysql_install_db.sh 2009-01-05 13:10:04 +0000 @@ -21,6 +21,7 @@ basedir="" builddir="" ldata="@localstatedir@" +langdir="" srcdir="" args="" @@ -171,7 +172,20 @@ cannot_find_file() { echo - echo "FATAL ERROR: Could not find $*" + echo "FATAL ERROR: Could not find $1" + + shift + if test $# -ne 0 + then + echo + echo "The following directories were searched:" + echo + for dir in "$@" + do + echo " ${dir}" + done + fi + echo echo "If you compiled from source, you need to run 'make install' to" echo "copy the software into the correct location ready for operation." @@ -210,6 +224,11 @@ elif test -n "$basedir" then print_defaults=`find_in_basedir my_print_defaults bin extra` + if test -z "${print_defaults}" + then + cannot_find_file my_print_defaults $basedir/bin $basedir/extra + exit 1 + fi else print_defaults="@bindir@/my_print_defaults" fi @@ -232,7 +251,7 @@ bindir="$basedir/client" extra_bindir="$basedir/extra" mysqld="$basedir/sql/mysqld" - mysqld_opt="--language=$srcdir/sql/share/english" + langdir="$srcdir/sql/share/english" pkgdatadir="$srcdir/scripts" scriptdir="$srcdir/scripts" elif test -n "$basedir" @@ -240,7 +259,23 @@ bindir="$basedir/bin" extra_bindir="$bindir" mysqld=`find_in_basedir mysqld libexec sbin bin` + if test -z "${mysqld}" + then + cannot_find_file mysqld $basedir/libexec $basedir/sbin $basedir/bin + exit 1 + fi + langdir=`find_in_basedir --dir errmsg.sys share/english share/mysql/english` + if test -z "${langdir}" + then + cannot_find_file errmsg.sys $basedir/share/english $basedir/share/mysql/english + exit 1 + fi pkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql` + if test -z "${pkgdatadir}" + then + cannot_find_file fill_help_tables.sql $basedir/share $basedir/share/mysql + exit 1 + fi scriptdir="$basedir/scripts" else basedir="@prefix@" @@ -271,6 +306,16 @@ exit 1 fi +if test -n "$langdir" +then + if test ! -f "$langdir/errmsg.sys" + then + cannot_find_file "errmsg.sys" + exit 1 + fi + mysqld_opt="--language=$langdir" +fi + # Try to determine the hostname hostname=`@HOSTNAME@`