| 1 | # Copyright 1999-2009 Gentoo Foundation |
1 | # Copyright 1999-2009 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.140 2010/03/24 03:09:08 robbat2 Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.142 2010/03/24 20:37:54 robbat2 Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: mysql.eclass |
5 | # @ECLASS: mysql.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Author: Francesco Riosa (Retired) <vivo@gentoo.org> |
7 | # Author: Francesco Riosa (Retired) <vivo@gentoo.org> |
| 8 | # Maintainers: MySQL Team <mysql-bugs@gentoo.org> |
8 | # Maintainers: MySQL Team <mysql-bugs@gentoo.org> |
| … | |
… | |
| 177 | DESCRIPTION="A fast, multi-threaded, multi-user SQL database server." |
177 | DESCRIPTION="A fast, multi-threaded, multi-user SQL database server." |
| 178 | HOMEPAGE="http://www.mysql.com/" |
178 | HOMEPAGE="http://www.mysql.com/" |
| 179 | if [[ "${PN}" == "mariadb" ]]; then |
179 | if [[ "${PN}" == "mariadb" ]]; then |
| 180 | HOMEPAGE="http://askmonty.org/" |
180 | HOMEPAGE="http://askmonty.org/" |
| 181 | DESCRIPTION="MariaDB is a MySQL fork with 3rd-party patches and additional storage engines merged." |
181 | DESCRIPTION="MariaDB is a MySQL fork with 3rd-party patches and additional storage engines merged." |
|
|
182 | fi |
|
|
183 | if [[ "${PN}" == "mysql-community" ]]; then |
|
|
184 | DESCRIPTION="${DESCRIPTION} (obsolete, move to dev-db/mysql)" |
| 182 | fi |
185 | fi |
| 183 | LICENSE="GPL-2" |
186 | LICENSE="GPL-2" |
| 184 | SLOT="0" |
187 | SLOT="0" |
| 185 | IUSE="big-tables debug embedded minimal ${IUSE_DEFAULT_ON}perl selinux ssl static test" |
188 | IUSE="big-tables debug embedded minimal ${IUSE_DEFAULT_ON}perl selinux ssl static test" |
| 186 | |
189 | |
| … | |
… | |
| 1107 | local pwd1="a" |
1110 | local pwd1="a" |
| 1108 | local pwd2="b" |
1111 | local pwd2="b" |
| 1109 | local MYSQL_ROOT_PASSWORD='' |
1112 | local MYSQL_ROOT_PASSWORD='' |
| 1110 | local maxtry=15 |
1113 | local maxtry=15 |
| 1111 | |
1114 | |
|
|
1115 | if [ -z "${MYSQL_ROOT_PASSWORD}" -a -f "${ROOT}/root/.my.cnf" ]; then |
|
|
1116 | MYSQL_ROOT_PASSWORD="$(sed -n -e '/^password=/s,^password=,,gp' "${ROOT}/root/.my.cnf")" |
|
|
1117 | fi |
|
|
1118 | |
| 1112 | if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then |
1119 | if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then |
| 1113 | ewarn "You have already a MySQL database in place." |
1120 | ewarn "You have already a MySQL database in place." |
| 1114 | ewarn "(${ROOT}/${MY_DATADIR}/*)" |
1121 | ewarn "(${ROOT}/${MY_DATADIR}/*)" |
| 1115 | ewarn "Please rename or delete it if you wish to replace it." |
1122 | ewarn "Please rename or delete it if you wish to replace it." |
| 1116 | die "MySQL database already exists!" |
1123 | die "MySQL database already exists!" |