summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Longinotti <chtekk@gentoo.org>2006-11-23 15:46:49 +0000
committerLuca Longinotti <chtekk@gentoo.org>2006-11-23 15:46:49 +0000
commit2cf032f0faa486ab2eff3e89c09590b02a274425 (patch)
treedf690ea8dedbc3a02fbd20a5db0f159afbebb831 /dev-db/mysql-community
parentdev-db/mysql => virtual/mysql (diff)
downloadhistorical-2cf032f0faa486ab2eff3e89c09590b02a274425.tar.gz
historical-2cf032f0faa486ab2eff3e89c09590b02a274425.tar.bz2
historical-2cf032f0faa486ab2eff3e89c09590b02a274425.zip
Add missing files, add tests warn msg for 5.1.
Package-Manager: portage-2.1.2_rc1-r7
Diffstat (limited to 'dev-db/mysql-community')
-rw-r--r--dev-db/mysql-community/ChangeLog6
-rw-r--r--dev-db/mysql-community/Manifest34
-rw-r--r--dev-db/mysql-community/files/logrotate.mysql15
-rw-r--r--dev-db/mysql-community/files/mysql.rc6357
-rw-r--r--dev-db/mysql-community/mysql-community-5.1.13_alpha20061018.ebuild9
5 files changed, 401 insertions, 20 deletions
diff --git a/dev-db/mysql-community/ChangeLog b/dev-db/mysql-community/ChangeLog
index 137d43a1825c..dbed22396d93 100644
--- a/dev-db/mysql-community/ChangeLog
+++ b/dev-db/mysql-community/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-db/mysql
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-community/ChangeLog,v 1.1 2006/11/23 13:58:06 vivo Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-community/ChangeLog,v 1.2 2006/11/23 15:46:49 chtekk Exp $
+
+ 23 Nov 2006; Luca Longinotti <chtekk@gentoo.org> +files/logrotate.mysql,
+ +files/mysql.rc6, mysql-community-5.1.13_alpha20061018.ebuild:
+ Add missing files, add tests warn msg for 5.1.
*mysql-community-5.1.13_alpha20061018 (23 Nov 2006)
*mysql-community-5.0.27 (23 Nov 2006)
diff --git a/dev-db/mysql-community/Manifest b/dev-db/mysql-community/Manifest
index b1d2216ae273..8d07744593ac 100644
--- a/dev-db/mysql-community/Manifest
+++ b/dev-db/mysql-community/Manifest
@@ -1,6 +1,7 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
+AUX logrotate.mysql 450 RMD160 ea804c1c12651d5d5ba1c1fd5a53e79e42239ee3 SHA1 fdc6d1821521cbf887958078e87e90f1984d34e4 SHA256 7443622f2783065e406c1005fa4980801ff092bcedd419cfc96fc533110f758d
+MD5 ad791253bda1ee8cc2c6dcb6e909a74a files/logrotate.mysql 450
+RMD160 ea804c1c12651d5d5ba1c1fd5a53e79e42239ee3 files/logrotate.mysql 450
+SHA256 7443622f2783065e406c1005fa4980801ff092bcedd419cfc96fc533110f758d files/logrotate.mysql 450
AUX my.cnf-4.1 4220 RMD160 fd98c93f199b631164b1623965751cc3b367d04a SHA1 53eda46daed88bf450bb75e0cce08bc5b3f9b268 SHA256 e07909810868e75410c26b0e9b9d00a61c8d303f8a912b4b1232dbdbb168aac1
MD5 06cafc559c9f18d2b215e62df55ee038 files/my.cnf-4.1 4220
RMD160 fd98c93f199b631164b1623965751cc3b367d04a files/my.cnf-4.1 4220
@@ -9,6 +10,10 @@ AUX mysql.conf.d 3273 RMD160 a2661c832c1091b2d05e599fc58cce6f686c7f31 SHA1 64e9b
MD5 092bb6cad90a875da8899e104304c969 files/mysql.conf.d 3273
RMD160 a2661c832c1091b2d05e599fc58cce6f686c7f31 files/mysql.conf.d 3273
SHA256 ee049781a3885305ce9999371198ff54f97fee4d2ad0814ba3aa3a03abc2724c files/mysql.conf.d 3273
+AUX mysql.rc6 10634 RMD160 8bcbcc00004cf274a783fb83f6ab4d3eda15e625 SHA1 dfb872e1db1ef7e9ab5552792c28d4770ffa36fc SHA256 ff82da90eb08ad103eb2d7bb1500c4b01a0114a16f115c4892f9526e8dad0e65
+MD5 fc5857a4d2d914d98eeea84daa069a7d files/mysql.rc6 10634
+RMD160 8bcbcc00004cf274a783fb83f6ab4d3eda15e625 files/mysql.rc6 10634
+SHA256 ff82da90eb08ad103eb2d7bb1500c4b01a0114a16f115c4892f9526e8dad0e65 files/mysql.rc6 10634
AUX mysqlmanager.conf.d 1009 RMD160 b443dc0cd1cb7fb054fe7229a52b8d093e634652 SHA1 0d82531df24ba4f0d957176b6fa0076a1cae0356 SHA256 35353f585cc9d3f97bbcfe77224d183e0fedcf4134377b8bff4c278462577cc7
MD5 c94178cadec3be56c4e6c7ec9812cfcf files/mysqlmanager.conf.d 1009
RMD160 b443dc0cd1cb7fb054fe7229a52b8d093e634652 files/mysqlmanager.conf.d 1009
@@ -24,14 +29,14 @@ EBUILD mysql-community-5.0.27.ebuild 1144 RMD160 ea5b38b77083957af46e0fa17ea8d9a
MD5 0fdbb0271ad6965bf286b9b352e0187e mysql-community-5.0.27.ebuild 1144
RMD160 ea5b38b77083957af46e0fa17ea8d9a3c84176db mysql-community-5.0.27.ebuild 1144
SHA256 86363b75abc9543f4b2a9598e433c67f22d5374077bfa9f542b92c7dd2bd2563 mysql-community-5.0.27.ebuild 1144
-EBUILD mysql-community-5.1.13_alpha20061018.ebuild 570 RMD160 f81fac0ee2956d26263c9ff7e9af3e045dd65191 SHA1 8597b278ca9b922c2b99aa850ba6bcd576134738 SHA256 e384bf3b2f13fc341bcba252efa2abb49e2c1991460174bbeff52bc78b31f3a2
-MD5 ee027fb4186d073d7d3c48b83ba48439 mysql-community-5.1.13_alpha20061018.ebuild 570
-RMD160 f81fac0ee2956d26263c9ff7e9af3e045dd65191 mysql-community-5.1.13_alpha20061018.ebuild 570
-SHA256 e384bf3b2f13fc341bcba252efa2abb49e2c1991460174bbeff52bc78b31f3a2 mysql-community-5.1.13_alpha20061018.ebuild 570
-MISC ChangeLog 613 RMD160 7d631c49fc24ea834178fc398cab72518e7c7b75 SHA1 76bc8d77e249e29ad87aa2a89ed49200dd0a959c SHA256 3f6ba1bd316e620f1878e8ac80a7242eed22e56d49db91460f70da248bc20276
-MD5 8b439eccb492c881c5908f3068cf1876 ChangeLog 613
-RMD160 7d631c49fc24ea834178fc398cab72518e7c7b75 ChangeLog 613
-SHA256 3f6ba1bd316e620f1878e8ac80a7242eed22e56d49db91460f70da248bc20276 ChangeLog 613
+EBUILD mysql-community-5.1.13_alpha20061018.ebuild 699 RMD160 0dfbe746c7d24c041f4e100234d03d716eab0682 SHA1 f02b3f03d98604cd34b68e656175a3acce592155 SHA256 648bd457e3a10bda7e78525f3fbe514d5c00d2823fe90ba383cfd7315a12ee5e
+MD5 6714795b82436dac188a904e001741e1 mysql-community-5.1.13_alpha20061018.ebuild 699
+RMD160 0dfbe746c7d24c041f4e100234d03d716eab0682 mysql-community-5.1.13_alpha20061018.ebuild 699
+SHA256 648bd457e3a10bda7e78525f3fbe514d5c00d2823fe90ba383cfd7315a12ee5e mysql-community-5.1.13_alpha20061018.ebuild 699
+MISC ChangeLog 805 RMD160 56b5743170bc8d92cd2c38c9332ea11e15dfb8e5 SHA1 af4dcfe31dc7c5aa247853d82f3e4e69b5ed42e0 SHA256 0c84816a97fb12ee861fe19982733890f43f3573bc82e527f8624bc57a09729b
+MD5 4ab46c121f9c24d01dd05ea5137931b3 ChangeLog 805
+RMD160 56b5743170bc8d92cd2c38c9332ea11e15dfb8e5 ChangeLog 805
+SHA256 0c84816a97fb12ee861fe19982733890f43f3573bc82e527f8624bc57a09729b ChangeLog 805
MISC metadata.xml 159 RMD160 a50a94af7706288c46f81d6c3da9b5f888050eee SHA1 5eb253a678d6faa0f1c6b3c5720a804ed8923566 SHA256 5cfd5aa0e8104c0326b5f4c9205a6449a94e0f6f6abfd2626f1e7a8fe77b98b7
MD5 f1c86d989c7ea2451931e7e2c3530f8c metadata.xml 159
RMD160 a50a94af7706288c46f81d6c3da9b5f888050eee metadata.xml 159
@@ -42,10 +47,3 @@ SHA256 573b6c9a15e487d36967fd8faeeea83c9ac49d9cf8fa6efc6ccb6a982f85bfa1 files/di
MD5 5b1a20d6a4cc2b82b91161be043099ad files/digest-mysql-community-5.1.13_alpha20061018 280
RMD160 6647bb65ed37800a236b1cf6f0873ee129ba0758 files/digest-mysql-community-5.1.13_alpha20061018 280
SHA256 a3b9a24c9133b65ba097615211ac40a0f7f466456ccf9b39920956866eed4bee files/digest-mysql-community-5.1.13_alpha20061018 280
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.5 (GNU/Linux)
-
-iD8DBQFFZavBKolR564NvWYRAsOjAKC43F97h2UD6G9I6eEIO63YLI3b2wCeMDHr
-Hygj/CON7fp7Tw42yx5UwfA=
-=jTzi
------END PGP SIGNATURE-----
diff --git a/dev-db/mysql-community/files/logrotate.mysql b/dev-db/mysql-community/files/logrotate.mysql
new file mode 100644
index 000000000000..4d4c23eb6cd2
--- /dev/null
+++ b/dev-db/mysql-community/files/logrotate.mysql
@@ -0,0 +1,15 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-community/files/logrotate.mysql,v 1.1 2006/11/23 15:46:49 chtekk Exp $
+
+/var/log/mysql/mysql.err /var/log/mysql/mysql.log /var/log/mysql/mysqld.err {
+monthly
+create 660 mysql mysql
+notifempty
+size 5M
+sharedscripts
+missingok
+postrotate
+/bin/kill -HUP `cat /var/run/mysqld/mysqld.pid`
+endscript
+}
diff --git a/dev-db/mysql-community/files/mysql.rc6 b/dev-db/mysql-community/files/mysql.rc6
new file mode 100644
index 000000000000..7b23901c226f
--- /dev/null
+++ b/dev-db/mysql-community/files/mysql.rc6
@@ -0,0 +1,357 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-community/files/mysql.rc6,v 1.1 2006/11/23 15:46:49 chtekk Exp $
+
+# external binaries used: which, sed, tac
+
+# int in_list(char * elem, char * list)
+function in_list() {
+ local elem=${1:-"none"}
+ local list=${2:-","}
+
+ [[ "${list}" == "${list/,${elem},/}" ]] \
+ && return 1 \
+ || return 0
+}
+
+function wdebug() {
+ if [[ "${DEBUG}" -ge "${1}" ]] ; then
+ shift
+ echo "dbg: ${@}"
+ fi
+}
+
+depend() {
+ use dns net localmount netmount nfsmount
+}
+
+do_escape() {
+ # Ihatethisreallyverymuch
+ #echo "$1" | sed -e "s|'| |" -e "s|=|='|" -e "s|$|'|"
+ echo "$1"
+}
+
+# int get_slot_config(srv_slot=0, srv_num)
+get_slot_config() {
+ wdebug 4 ">>> get_slot_config()"
+
+ local srv srv_slot srv_num
+ srv_slot="${1:-"0"}"
+ srv_num="${2}"
+ MY_SUFFIX="-${srv_slot}"
+ # srv=array(0 => [srv_slot], 1 => [srv_num] )
+ srv=( ${srv_slot} ${srv_num} )
+
+ local tmp_eval="mysql_slot_${srv_slot}${srv_num:+"_"}${srv_num}[@]"
+ local conf_d_parameters="${!tmp_eval}"
+ if [[ "${srv_slot}" == "0" ]] ; then
+ MY_SUFFIX=''
+ # try some other default for the default server
+ [[ -z "${conf_d_parameters[@]}" ]] && conf_d_parameters=${mysql_slot[@]}
+ fi
+ [[ -z "${conf_d_parameters[@]}" ]] && conf_d_parameters=( )
+ basedir="" datadir="" pidfile="" socket=""
+ CHROOT="" NICE="" STARTUPTIMEOUT=5 STOPTIMEOUT=120
+
+ wdebug 3 "srv ${srv[@]}"
+ wdebug 3 "srv_slot ${srv_slot}"
+ wdebug 3 "srv_num ${srv_num}"
+ wdebug 3 "tmp_eval ${tmp_eval}"
+ wdebug 3 "conf_d_parameters ${conf_d_parameters[@]}"
+ wdebug 3 "MY_SUFFIX ${MY_SUFFIX}"
+
+ local tmp_eval="mysql_slot_${srv_slot}${srv_num:+"_"}${srv_num}[@]"
+ local conf_d_parameters="${!tmp_eval}"
+ # collations need to be defined *after* the character sets,
+ # so we will duplicate them
+ local collations=""
+ [[ ${conf_d_parameters[*]} == '()' ]] && conf_d_parameters=''
+
+ MY_CNF="/etc/mysql${MY_SUFFIX}/my.cnf"
+ # summa of unmanaged parameters
+ # some parameters may be present multiple times
+ unmanagedparams=""
+
+ # grab the parameters from conf.d/mysql definition
+ for my_default in ${conf_d_parameters[*]} ; do
+ case "${my_default}" in
+ nice=*)
+ NICE="${my_default#nice=}"
+ nice -n $NICE ls /tmp &>/dev/null || NICE=""
+ ;;
+ mycnf=*) MY_CNF="${my_default#mycnf=}" ;;
+ startup_timeout=*)
+ STARTUPTIMEOUT="${my_default#startup_timeout=}" ;;
+ basedir=*) basedir="${my_default#basedir=}" ;;
+ datadir=*) datadir="${my_default#datadir=}" ;;
+ pid-file=*) pidfile="${my_default#pid-file=}" ;;
+ socket=*) socket="${my_default#socket=}" ;;
+ *collation*=)
+ collations="${collations} --$( do_escape "${my_default}" )"
+ ;;
+ *=*)
+ # list of parameters we already have
+ # prepend "--" because my_print_defaults do it
+ unmanagedparams="${unmanagedparams} --$( do_escape "${my_default}" )"
+ ;;
+ *)
+ unmanagedparams="${unmanagedparams} --${my_default}"
+ ;;
+ esac
+ done
+
+ if [[ ! -r "${MY_CNF}" ]] ; then
+ ewarn "Cannot access ${MY_CNF} !"
+ MY_CNF=""
+ my_defaults=""
+ else
+ local my_print_defaults="$(which my_print_defaults${MY_SUFFIX} 2>/dev/null)"
+ if [[ ! -x "${my_print_defaults}" ]] ; then
+ eerror "my_print_defaults NOT found or not executable"
+ my_defaults=""
+ else
+ my_defaults=$( ${my_print_defaults} \
+ --loose-verbose \
+ --config-file="${MY_CNF}" \
+ mysqld server )
+ fi
+ fi
+
+ # grab needed parameters from my.cnf, don't override the ones from
+ # conf.d/mysql
+ for my_default in ${my_defaults} ; do
+ case "${my_default}" in
+ --basedir=*)
+ [[ -z "${basedir}" ]] && basedir="${my_default#--basedir=}" ;;
+ --datadir=*)
+ [[ -z "${datadir}" ]] && datadir="${my_default#--datadir=}" ;;
+ --pid-file=*)
+ [[ -z "${pidfile}" ]] && pidfile="${my_default#--pid-file=}" ;;
+ --socket=*)
+ [[ -z "${socket}" ]] && socket="${my_default#--socket=}" ;;
+ --*collation*=)
+ # the order is inversed because we want the conf.d ones overriden
+ collations="$( do_escape "${my_default}" ) ${collations}"
+ ;;
+ esac
+ done
+
+ # some parameters
+ basedir="${basedir:-"/usr"}"
+ datadir="${datadir:-"/var/lib/mysql${MY_SUFFIX}"}"
+ pidfile="${pidfile:-"/var/run/mysqld/mysqld${MY_SUFFIX}.pid"}"
+ socket="${socket:-"/var/run/mysqld/mysqld${MY_SUFFIX}.sock"}"
+ unmanagedparams="${unmanagedparams} ${collations}"
+
+ wdebug 3 "chroot dir => ${CHROOT}"
+ wdebug 3 "niceness => ${NICE}"
+ wdebug 3 "basedir => ${basedir}"
+ wdebug 3 "datadir => ${datadir}"
+ wdebug 3 "pidfile => ${pidfile}"
+ wdebug 3 "socket => ${socket}"
+ wdebug 3 "Unamanged => ${unmanagedparams}"
+
+ # extension for sleep tenth of seconds, not very portable so check it before
+ if sleep 0.01 ; then
+ STARTUPTIMEOUT=$(( STARTUPTIMEOUT * 10 ))
+ STOPTIMEOUT=$(( STOPTIMEOUT * 10 ))
+ TIMEUNIT=0.1
+ else
+ TIMEUNIT=1
+ fi
+
+ # push these out to the script
+ export MY_SUFFIX NICE MY_CNF pidfile datadir basedir socket CHROOT
+ export unmanagedparams STARTUPTIMEOUT STOPTIMEOUT TIMEUNIT
+ wdebug 4 "<<< get_slot_config() ok"
+ return 0
+}
+
+checkconfig() {
+ wdebug 4 ">>> checkconfig(\"${1}\")"
+ local datadir="${1}" pidfile="${2}" socket="${3}"
+
+ if [[ -n "${NOCHECK}" ]] ; then
+ rm -f "${pidfile}" "${socket}"
+ return 0
+ fi
+
+ if [[ ! -d "${datadir}" ]] ; then
+ eerror "MySQL datadir is empty or invalid"
+ eerror "Please check your my.cnf : ${MY_CNF}"
+ wdebug 4 "<<< checkconfig() KO"
+ return 1
+ fi
+
+ if [[ ! -d "${datadir}/mysql" ]] ; then
+ eerror "You don't appear to have the mysql database installed yet."
+ eerror "Please run /usr/bin/mysql_install_db to have this done..."
+ wdebug 4 "<<< checkconfig() KO"
+ return 1
+ fi
+
+ if [[ -f "${pidfile}" ]] ; then
+ kill -15 $(< ${pidfile}) 2>/dev/null
+ if [[ $? -eq 0 ]] ; then
+ # the process exist, we have a problem
+ eerror "\"${pidfile}\" is still present and the process is running."
+ eerror "Please stop it \"kill $(< ${pidfile})\" maybe ?"
+ wdebug 4 "<<< checkconfig() KO"
+ return 1
+ else
+ rm -f "${pidfile}"
+ fi
+ fi
+
+ if [[ -S "${socket}" ]] ; then
+ ewarn "Strange, the socket file already exist in \"${socket}\""
+ ewarn "it will be removed now and re-created by the MySQL server"
+ ewarn "BUT please make your checks."
+ rm -f "${socket}"
+ fi
+
+ wdebug 4 "<<< checkconfig() ok"
+ return 0
+}
+
+start() {
+ wdebug 4 ">>> start()"
+
+ MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME/mysql/mysqld}"}
+ # servers are defined in /etc/conf.d/mysql
+ local serverlist=${!mysql_slot_*}
+ # provide default for empty conf.d/mysql
+ if [[ -z "${serverlist}" ]] ; then
+ serverlist=0
+ export mysql_slot_0=( )
+ fi
+ local retstatus timeout
+ local globretstatus=1
+ local srv_slot srv_num
+ # server MUST NOT share same location for these
+ local pidfilelist=',' datadirlist=',' socketlist=','
+ local ssd_thing=1
+ local mysqld_thing tmpnice
+
+ ebegin "Starting ${myservice}"
+ # try to start each server
+ for srv in ${serverlist[*]} ; do
+
+ srv_slot="${srv#mysql_slot_}"
+ if [[ "${srv_slot}" == "${srv_slot#*_}" ]] ; then
+ srv_num=''
+ else
+ srv_num="${srv_slot#*_}"
+ fi
+ srv_slot="${srv_slot%%_*}"
+
+ retstatus=0
+ get_slot_config "${srv_slot}" "${srv_num}" || retstatus=1
+
+ # checks
+ if ! checkconfig "${datadir}" "${pidfile}" "${socket}" ; then
+ retstatus=2 ; continue
+ fi
+ if in_list "${pidfile}" "${pidfilelist}" ; then
+ eerror "Sorry, won't start with same pid-file: ${pidfile}"
+ retstatus=3 ; continue
+ fi
+ if in_list "${datadir}" "${datadirlist}" ; then
+ eerror "Sorry, won't start with same datadir: ${datadir}"
+ retstatus=4 ; continue
+ fi
+ if in_list "${socket}" "${socketlist}" ; then
+ eerror "Sorry, won't start with same socket: ${socket}"
+ retstatus=5 ; continue
+ fi
+
+ einfo "Starting ${myservice} (${MY_CNF})"
+
+ mysqld_thing="${MY_CNF:+"--defaults-file="}${MY_CNF}"
+ mysqld_thing="${mysqld_thing} ${unmanagedparams}"
+ mysqld_thing="${mysqld_thing} --basedir=${basedir}"
+ mysqld_thing="${mysqld_thing} --datadir=${datadir}"
+ mysqld_thing="${mysqld_thing} --pid-file=${pidfile}"
+ mysqld_thing="${mysqld_thing} --socket=${socket}"
+
+ wdebug 2 "starting mysqld with: ${mysqld_thing}"
+
+ if [[ ${ssd_thing} -eq 1 ]] ; then
+ tmpnice="${NICE:+"--nicelevel "}${NICE}"
+ start-stop-daemon --quiet ${DEBUG/*/"--verbose"} --start \
+ --background ${tmpnice} --pidfile ${pidfile} \
+ --exec ${basedir}/sbin/mysqld${MY_SUFFIX} -- ${mysqld_thing}
+ retstatus=$?
+ else
+ tmpnice="${NICE:+"nice -n "}${NICE}"
+ ${tmpnice} ${basedir}/sbin/mysqld${MY_SUFFIX} ${mysqld_thing} &
+ retstatus=0
+ fi
+
+ # only the first run is done by start-stop-daemon
+ ssd_thing=""
+
+ # wait for socket creation
+ wdebug 1
+ while ! [[ -S "${socket}" || "${STARTUPTIMEOUT}" -lt 1 || "${retstatus}" -ne 0 ]] ; do
+ STARTUPTIMEOUT=$(( STARTUPTIMEOUT - 1 ))
+ [[ ${DEBUG} -ge 1 ]] && echo -n "${STARTUPTIMEOUT},"
+ sleep ${TIMEUNIT}
+ done
+ wdebug 1 ""
+ if [[ ! -S "${socket}" ]] ; then
+ eerror "MySQL${MY_SUFFIX} NOT started (${retstatus})"
+ retstatus=1
+ else
+ globretstatus=0
+ pidfilelist="${pidfilelist}${pidfile},"
+ datadirlist="${datadirlist}${datadir},"
+ socketlist="${socketlist}${socket},"
+ echo "${srv_slot}${srv_num:+"_"}${srv_num}=${pidfile}" >> "${MYSQL_GLOB_PID_FILE}"
+ fi
+ done
+ # successfull if at least one mysqld started
+ wdebug 4 "<<< start()"
+ eend $globretstatus
+}
+
+stop() {
+ get_slot_config &> /dev/null
+ MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME/mysql/mysqld}"}
+ local runwhat pidfile shutdown_elem
+ local PID cnt timeout=${STOPTIMEOUT:-"120"}
+ local retstatus=0
+ local shutdown_list="$(< "${MYSQL_GLOB_PID_FILE}" )"
+
+ ebegin "Stopping ${myservice}"
+ wdebug 5 "MYSQL_GLOB_PID_FILE: ${MYSQL_GLOB_PID_FILE}"
+ wdebug 5 "shutdown_list: ${shutdown_list}"
+ for shutdown_elem in ${shutdown_list} ; do
+ runwhat=${shutdown_elem%%=*}
+ pidfile=${shutdown_elem#*=}
+ timeout=${STOPTIMEOUT:-"120"}
+ PID=$(< "${pidfile}" )
+ wdebug 3 "runwhat ${runwhat}"
+ wdebug 3 "pidfile ${pidfile}"
+ wdebug 3 "timeout ${timeout}"
+ wdebug 3 "PID ${PID}"
+
+ einfo "Stopping mysqld (${runwhat})"
+
+ start-stop-daemon --quiet ${DEBUG/*/"--verbose"} --stop --pidfile "${pidfile}" &
+ wdebug 1 ""
+ while [[ -n "$PID" ]] \
+ && $( ps -Ao pid | grep -q "^ *$PID$" ) \
+ && [[ "${timeout}" -ge 1 ]]
+ do
+ timeout=$(($timeout - 1))
+ [[ ${DEBUG} -ge 1 ]] && echo -n "$(( $STOPTIMEOUT - $timeout )),"
+ sleep ${TIMEUNIT}
+ done
+ [[ "${timeout}" -lt 1 ]] && retstatus=1
+ done
+ sleep ${TIMEUNIT}
+ [[ "$retstatus" -eq 0 ]] && rm -f "$MYSQL_GLOB_PID_FILE"
+ eend ${retstatus}
+}
diff --git a/dev-db/mysql-community/mysql-community-5.1.13_alpha20061018.ebuild b/dev-db/mysql-community/mysql-community-5.1.13_alpha20061018.ebuild
index 8417d1b89581..96020fdde7ed 100644
--- a/dev-db/mysql-community/mysql-community-5.1.13_alpha20061018.ebuild
+++ b/dev-db/mysql-community/mysql-community-5.1.13_alpha20061018.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-community/mysql-community-5.1.13_alpha20061018.ebuild,v 1.1 2006/11/23 13:58:06 vivo Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-community/mysql-community-5.1.13_alpha20061018.ebuild,v 1.2 2006/11/23 15:46:49 chtekk Exp $
# Leave this empty
MYSQL_VERSION_ID=""
@@ -13,3 +13,10 @@ inherit mysql
#REMEMBER!!!: update also eclass/mysql*.eclass prior to commit
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+src_test() {
+ cd "${S}"
+ einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
+ eerror
+ eerror "Tests aren't ready yet!"
+ eerror
+}