List:Commits« Previous MessageNext Message »
From:Jonathan Perkin Date:January 6 2009 3:22pm
Subject:bzr push into mysql-6.0 branch (jperkin:2803 to 2804) Bug#41828
View as plain text  
 2804 Jonathan Perkin	2009-01-06 [merge]
      Merge bug#41828 fix to mysql-6.0-build.
modified:
  scripts/mysql_install_db.sh

 2803 Joerg Bruehe	2008-12-31 [merge]
      Merge recent tool changes (shell portability, avoid bashisms).
modified:
  BUILD/compile-pentium-gcov
  BUILD/compile-solaris-amd64
  libmysqld/examples/test-run
  mysql-test/create-test-result
  netware/BUILD/nwbootstrap
  storage/archive/support/archive_read_test.slap
  storage/innobase/pars/make_bison.sh
  storage/innobase/pars/make_flex.sh
  storage/maria/ma_test_big.sh
  storage/myisam/mi_test_all.sh
  storage/ndb/demos/run_demo1-PS.sh
  storage/ndb/demos/run_demo1-SS.sh

=== modified file 'scripts/mysql_install_db.sh'

=== modified file 'scripts/mysql_install_db.sh'
--- a/scripts/mysql_install_db.sh	2008-09-02 09:14:57 +0000
+++ b/scripts/mysql_install_db.sh	2009-01-06 15:20:14 +0000
@@ -21,6 +21,7 @@
 basedir=""
 builddir=""
 ldata="@localstatedir@"
+langdir=""
 srcdir=""
 
 args=""
@@ -106,7 +107,7 @@
         # Note that the user will be passed to mysqld so that it runs
         # as 'user' (crucial e.g. if log-bin=/some_other_path/
         # where a chown of datadir won't help)
-	 user=`parse_arg "$arg"` ;;
+        user=`parse_arg "$arg"` ;;
       --skip-name-resolve) ip_only=1 ;;
       --verbose) verbose=1 ;; # Obsolete
       --rpm) in_rpm=1 ;;
@@ -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 "$langdir/errmsg.sys"
+    exit 1
+  fi
+  mysqld_opt="--language=$langdir"
+fi
+
 # Try to determine the hostname
 hostname=`@HOSTNAME@`
 

Thread
bzr push into mysql-6.0 branch (jperkin:2803 to 2804) Bug#41828Jonathan Perkin6 Jan