From: Francesco Riosa Date: Thu, 27 Oct 2005 22:17:31 +0000 (+0000) Subject: fix bug #110553, removed duplicate code X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=27854a3621da2386f00e6630e9a6b88629adc3ef;p=gentoo.git fix bug #110553, removed duplicate code Package-Manager: portage-2.0.53_rc6 --- diff --git a/dev-db/mysql/ChangeLog b/dev-db/mysql/ChangeLog index 228dae494a3b..e5d019e58684 100644 --- a/dev-db/mysql/ChangeLog +++ b/dev-db/mysql/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-db/mysql # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/ChangeLog,v 1.256 2005/10/25 17:50:45 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/ChangeLog,v 1.257 2005/10/27 22:17:31 vivo Exp $ + + 27 Oct 2005; Francesco Riosa mysql-4.0.25-r2.ebuild, + mysql-4.0.26.ebuild, mysql-4.1.14.ebuild, mysql-4.1.15.ebuild, + mysql-5.0.13_rc.ebuild, mysql-5.0.15.ebuild: + fix bug #110553, removed duplicate code 25 Oct 2005; Francesco Riosa mysql-4.1.14.ebuild: Backport fixes from 4.1.15, fix Bug 110442 diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest index c5567f5b6c7b..3494d90af358 100644 --- a/dev-db/mysql/Manifest +++ b/dev-db/mysql/Manifest @@ -1,25 +1,25 @@ -MD5 06d4538a7761f8a0caf247b2545df8a8 mysql-4.1.14.ebuild 18998 -MD5 d419eb0723fa69b4e938806f4aaf705f mysql-4.0.26.ebuild 14895 -MD5 af5393351bb355e6ca2e187afcc3fd34 mysql-5.0.15.ebuild 19150 -MD5 c727796d2a8548e62c735d262a0b8ee7 mysql-5.0.13_rc.ebuild 18929 -MD5 d4af8acfa6042b6149b81e3646637e27 mysql-4.1.15.ebuild 19022 -MD5 eb11a08abb447b7a69b192a6f9be3dbf mysql-3.23.58-r1.ebuild 7219 -MD5 c3e6e9efb45da0909cc8a2f27bf0ac88 ChangeLog 47141 -MD5 a2a9fdc7d010a7c04c96cb3b7c05f06b metadata.xml 158 -MD5 2318a7432107d2b7842f9e2fe87d8571 mysql-4.0.25-r2.ebuild 14266 -MD5 625b4007f035e3da9a4f1eeee1db6b9c files/mysql-4.0.15.rc6 1187 +MD5 a67005d901377e83c8c1829682ba0636 ChangeLog 47369 MD5 c6fcd70c34bed04e59808ec71c5bedfb files/digest-mysql-3.23.58-r1 140 +MD5 0feb3b501c47708ea13707c8e4cdde9c files/digest-mysql-4.0.25-r2 139 MD5 201c8b31cd9eb58eec712e37d6f0c328 files/digest-mysql-4.0.26 139 MD5 4e6e76e3945e29b6795ce6d1a66bc98f files/digest-mysql-4.1.14 139 MD5 b8eda6b8ec67faff78e5d01023e6eefb files/digest-mysql-4.1.15 139 -MD5 b9b44f65c775f650064022427ae52425 files/digest-mysql-5.0.15 139 -MD5 73be6460f548f6f73c70246a4cfd13a0 files/mysql.init 886 MD5 713dc46b7ffa15edda542a15508ce07c files/digest-mysql-5.0.13_rc 142 +MD5 b9b44f65c775f650064022427ae52425 files/digest-mysql-5.0.15 139 MD5 d200345efa421d012cf858134d2c8884 files/logrotate.mysql 440 MD5 f1fc8bfe540d6f1268b53b7cad275080 files/my.cnf 1231 +MD5 a8f89d11a0913332c5f8c1da5a21cc3f files/my.cnf-4.0.14-r1 2816 +MD5 9946a8f7163970ec4f6a713c97eadbe0 files/my.cnf-4.0.24-r1 4271 MD5 277705080f05b5b98b815487e080e562 files/my.cnf-4.1 4068 +MD5 625b4007f035e3da9a4f1eeee1db6b9c files/mysql-4.0.15.rc6 1187 MD5 d0fbdf4e41f2b52210eef6cb3a53e128 files/mysql-4.0.24-r1.rc6 1662 MD5 08f1246e8107e4140378d429ff9773af files/mysql-4.0.24-r2.rc6 2123 -MD5 a8f89d11a0913332c5f8c1da5a21cc3f files/my.cnf-4.0.14-r1 2816 -MD5 9946a8f7163970ec4f6a713c97eadbe0 files/my.cnf-4.0.24-r1 4271 -MD5 0feb3b501c47708ea13707c8e4cdde9c files/digest-mysql-4.0.25-r2 139 +MD5 73be6460f548f6f73c70246a4cfd13a0 files/mysql.init 886 +MD5 a2a9fdc7d010a7c04c96cb3b7c05f06b metadata.xml 158 +MD5 eb11a08abb447b7a69b192a6f9be3dbf mysql-3.23.58-r1.ebuild 7219 +MD5 310c18100b92ec0786cf630ad0a17f94 mysql-4.0.25-r2.ebuild 14260 +MD5 a46e6cb73958dcc8919743ca5dbaf3c3 mysql-4.0.26.ebuild 14888 +MD5 f56393b6243ebdb86eb67c648cddd45b mysql-4.1.14.ebuild 18837 +MD5 731a61acc2c6d676743e2e040d38053f mysql-4.1.15.ebuild 18861 +MD5 662ccd43b0d8861cd0a7216828cceb76 mysql-5.0.13_rc.ebuild 18768 +MD5 396f6ae31c7194d096846c3cea87d846 mysql-5.0.15.ebuild 18989 diff --git a/dev-db/mysql/mysql-4.0.25-r2.ebuild b/dev-db/mysql/mysql-4.0.25-r2.ebuild index aba88505e6a3..b43b8265ae72 100644 --- a/dev-db/mysql/mysql-4.0.25-r2.ebuild +++ b/dev-db/mysql/mysql-4.0.25-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.25-r2.ebuild,v 1.23 2005/10/22 14:29:44 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.25-r2.ebuild,v 1.24 2005/10/27 22:17:31 vivo Exp $ inherit eutils gnuconfig flag-o-matic versionator @@ -370,6 +370,18 @@ pkg_preinst() { pkg_postinst() { mysql_get_datadir + # mind at FEATURES=collision-protect before to remove this + #empty dirs... + [ -d "${ROOT}/var/log/mysql" ] \ + || install -d -m0755 -o mysql -g mysql ${ROOT}/var/log/mysql + + #secure the logfiles... does this bother anybody? + touch ${ROOT}/var/log/mysql/mysql.{log,err} + chown mysql:mysql ${ROOT}/var/log/mysql/mysql* + chmod 0660 ${ROOT}/var/log/mysql/mysql* + # secure some directories + chmod 0750 ${ROOT}/var/log/mysql + if ! useq minimal; then # your friendly public service announcement... einfo @@ -398,7 +410,7 @@ pkg_config() { local pwd2="b" local maxtry=5 - if [[ -d "${DATADIR}/mysql" ]] ; then + if [[ -d "${ROOT}/${DATADIR}/mysql" ]] ; then ewarn "You have already a MySQL database in place." ewarn "Please rename it or delete it if you wish to replace it." die "MySQL database already exists!" @@ -421,7 +433,7 @@ pkg_config() { ${ROOT}/usr/bin/mysql_install_db || die "MySQL databases not installed" # MySQL 5.0 don't ned this - chown -R mysql:mysql ${DATADIR} + chown -R mysql:mysql ${ROOT}/${DATADIR} chmod 0750 ${ROOT}/${DATADIR} # now we can set the password @@ -429,7 +441,7 @@ pkg_config() { local mysqld="${ROOT}/usr/sbin/mysqld \ --skip-grant-tables \ --basedir=${ROOT}/usr \ - --datadir=${ROOT}/var/lib/mysql \ + --datadir=${ROOT}/${DATADIR} \ --skip-innodb \ --skip-bdb \ --max_allowed_packet=8M \ @@ -461,17 +473,3 @@ pkg_config() { einfo "done" } -pkg_postinst() { - # mind at FEATURES=collision-protect before to remove this - #empty dirs... - [ -d "${ROOT}/var/log/mysql" ] \ - || install -d -m0755 -o mysql -g mysql ${ROOT}/var/log/mysql - - #secure the logfiles... does this bother anybody? - touch ${ROOT}/var/log/mysql/mysql.{log,err} - chown mysql:mysql ${ROOT}/var/log/mysql/mysql* - chmod 0660 ${ROOT}/var/log/mysql/mysql* - # secure some directories - chmod 0750 ${ROOT}/var/log/mysql -} - diff --git a/dev-db/mysql/mysql-4.0.26.ebuild b/dev-db/mysql/mysql-4.0.26.ebuild index 705b7683e5a0..671d5bf994ec 100644 --- a/dev-db/mysql/mysql-4.0.26.ebuild +++ b/dev-db/mysql/mysql-4.0.26.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.26.ebuild,v 1.13 2005/10/22 16:51:04 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.26.ebuild,v 1.14 2005/10/27 22:17:31 vivo Exp $ inherit eutils gnuconfig flag-o-matic versionator @@ -391,6 +391,18 @@ pkg_preinst() { pkg_postinst() { mysql_get_datadir + # mind at FEATURES=collision-protect before to remove this + #empty dirs... + [ -d "${ROOT}/var/log/mysql" ] \ + || install -d -m0755 -o mysql -g mysql ${ROOT}/var/log/mysql + + #secure the logfiles... does this bother anybody? + touch ${ROOT}/var/log/mysql/mysql.{log,err} + chown mysql:mysql ${ROOT}/var/log/mysql/mysql* + chmod 0660 ${ROOT}/var/log/mysql/mysql* + # secure some directories + chmod 0750 ${ROOT}/var/log/mysql + if ! useq minimal; then # your friendly public service announcement... einfo @@ -419,7 +431,7 @@ pkg_config() { local pwd2="b" local maxtry=5 - if [[ -d "${DATADIR}/mysql" ]] ; then + if [[ -d "${ROOT}/${DATADIR}/mysql" ]] ; then ewarn "You have already a MySQL database in place." ewarn "Please rename it or delete it if you wish to replace it." die "MySQL database already exists!" @@ -442,7 +454,7 @@ pkg_config() { ${ROOT}/usr/bin/mysql_install_db || die "MySQL databases not installed" # MySQL 5.0 don't ned this - chown -R mysql:mysql ${DATADIR} + chown -R mysql:mysql ${ROOT}/${DATADIR} chmod 0750 ${ROOT}/${DATADIR} # now we can set the password @@ -450,7 +462,7 @@ pkg_config() { local mysqld="${ROOT}/usr/sbin/mysqld \ --skip-grant-tables \ --basedir=${ROOT}/usr \ - --datadir=${ROOT}/var/lib/mysql \ + --datadir=${ROOT}/${DATADIR} \ --skip-innodb \ --skip-bdb \ --max_allowed_packet=8M \ @@ -481,18 +493,3 @@ pkg_config() { einfo "done" } - -pkg_postinst() { - # mind at FEATURES=collision-protect before to remove this - #empty dirs... - [ -d "${ROOT}/var/log/mysql" ] \ - || install -d -m0755 -o mysql -g mysql ${ROOT}/var/log/mysql - - #secure the logfiles... does this bother anybody? - touch ${ROOT}/var/log/mysql/mysql.{log,err} - chown mysql:mysql ${ROOT}/var/log/mysql/mysql* - chmod 0660 ${ROOT}/var/log/mysql/mysql* - # secure some directories - chmod 0750 ${ROOT}/var/log/mysql -} - diff --git a/dev-db/mysql/mysql-4.1.14.ebuild b/dev-db/mysql/mysql-4.1.14.ebuild index 662e4b932c7a..82344f2b9ddc 100644 --- a/dev-db/mysql/mysql-4.1.14.ebuild +++ b/dev-db/mysql/mysql-4.1.14.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.1.14.ebuild,v 1.21 2005/10/25 17:50:45 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.1.14.ebuild,v 1.22 2005/10/27 22:17:31 vivo Exp $ inherit eutils gnuconfig flag-o-matic versionator @@ -361,7 +361,7 @@ src_test() { local retstatus addpredict /this-dir-does-not-exist/t9.MYI - # Temporary removed, 4.1.14 use mysql-test-run.pl instead + # Temporary removed, 4.1.14 use mysql-test-run.pl instead # of mysql-test-run, thus failing on test that should be # skipped. #version_is_at_least "5.0.6_beta" \ @@ -488,24 +488,6 @@ pkg_preinst() { pkg_postinst() { mysql_get_datadir - if ! useq minimal; then - # your friendly public service announcement... - einfo - einfo "You might want to run:" - einfo "\"emerge --config =${PF}\"" - einfo "if this is a new install." - einfo - if [[ "${PREVIOUS_DATADIR}" == "yes" ]] ; then - ewarn "Previous datadir found, it's YOUR job to change" - ewarn "ownership and have care of it" - fi - fi - - mysql_upgrade_warning - einfo "InnoDB is not optional as of MySQL-4.0.24, at the request of upstream." -} - -pkg_postinst() { # mind at FEATURES=collision-protect before to remove this #empty dirs... [ -d "${ROOT}/var/log/mysql" ] \ @@ -517,6 +499,18 @@ pkg_postinst() { chmod 0660 ${ROOT}/var/log/mysql/mysql* # secure some directories chmod 0750 ${ROOT}/var/log/mysql + + if ! useq minimal; then + # your friendly public service announcement... + einfo + einfo "You might want to run:" + einfo "\"emerge --config =${PF}\"" + einfo "if this is a new install." + einfo + fi + + mysql_upgrade_warning + einfo "InnoDB is not optional as of MySQL-4.0.24, at the request of upstream." } pkg_config() { @@ -534,7 +528,7 @@ pkg_config() { local pwd2="b" local maxtry=5 - if [[ -d "${DATADIR}/mysql" ]] ; then + if [[ -d "${ROOT}/${DATADIR}/mysql" ]] ; then ewarn "You have already a MySQL database in place." ewarn "Please rename it or delete it if you wish to replace it." die "MySQL database already exists!" @@ -557,7 +551,7 @@ pkg_config() { ${ROOT}/usr/bin/mysql_install_db || die "MySQL databases not installed" # MySQL 5.0 don't need this - chown -R mysql:mysql ${DATADIR} + chown -R mysql:mysql ${ROOT}/${DATADIR} chmod 0750 ${ROOT}/${DATADIR} local options="" @@ -582,7 +576,7 @@ pkg_config() { ${options} \ --skip-grant-tables \ --basedir=${ROOT}/usr \ - --datadir=${ROOT}/var/lib/mysql \ + --datadir=${ROOT}/${DATADIR} \ --skip-innodb \ --skip-bdb \ --max_allowed_packet=8M \ diff --git a/dev-db/mysql/mysql-4.1.15.ebuild b/dev-db/mysql/mysql-4.1.15.ebuild index 67625cee1a5c..5995746d891a 100644 --- a/dev-db/mysql/mysql-4.1.15.ebuild +++ b/dev-db/mysql/mysql-4.1.15.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.1.15.ebuild,v 1.3 2005/10/24 17:00:19 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.1.15.ebuild,v 1.4 2005/10/27 22:17:31 vivo Exp $ inherit eutils gnuconfig flag-o-matic versionator @@ -485,24 +485,6 @@ pkg_preinst() { pkg_postinst() { mysql_get_datadir - if ! useq minimal; then - # your friendly public service announcement... - einfo - einfo "You might want to run:" - einfo "\"emerge --config =${PF}\"" - einfo "if this is a new install." - einfo - if [[ "${PREVIOUS_DATADIR}" == "yes" ]] ; then - ewarn "Previous datadir found, it's YOUR job to change" - ewarn "ownership and have care of it" - fi - fi - - mysql_upgrade_warning - einfo "InnoDB is not optional as of MySQL-4.0.24, at the request of upstream." -} - -pkg_postinst() { # mind at FEATURES=collision-protect before to remove this #empty dirs... [ -d "${ROOT}/var/log/mysql" ] \ @@ -514,8 +496,19 @@ pkg_postinst() { chmod 0660 ${ROOT}/var/log/mysql/mysql* # secure some directories chmod 0750 ${ROOT}/var/log/mysql -} + if ! useq minimal; then + # your friendly public service announcement... + einfo + einfo "You might want to run:" + einfo "\"emerge --config =${PF}\"" + einfo "if this is a new install." + einfo + fi + + mysql_upgrade_warning + einfo "InnoDB is not optional as of MySQL-4.0.24, at the request of upstream." +} pkg_config() { mysql_get_datadir @@ -532,7 +525,7 @@ pkg_config() { local pwd2="b" local maxtry=5 - if [[ -d "${DATADIR}/mysql" ]] ; then + if [[ -d "${ROOT}/${DATADIR}/mysql" ]] ; then ewarn "You have already a MySQL database in place." ewarn "Please rename it or delete it if you wish to replace it." die "MySQL database already exists!" @@ -555,7 +548,7 @@ pkg_config() { ${ROOT}/usr/bin/mysql_install_db || die "MySQL databases not installed" # MySQL 5.0 don't need this - chown -R mysql:mysql ${DATADIR} + chown -R mysql:mysql ${ROOT}/${DATADIR} chmod 0750 ${ROOT}/${DATADIR} local options="" @@ -580,7 +573,7 @@ pkg_config() { ${options} \ --skip-grant-tables \ --basedir=${ROOT}/usr \ - --datadir=${ROOT}/var/lib/mysql \ + --datadir=${ROOT}/${DATADIR} \ --skip-innodb \ --skip-bdb \ --max_allowed_packet=8M \ diff --git a/dev-db/mysql/mysql-5.0.13_rc.ebuild b/dev-db/mysql/mysql-5.0.13_rc.ebuild index b15e8940656d..3c47ab6a63f6 100644 --- a/dev-db/mysql/mysql-5.0.13_rc.ebuild +++ b/dev-db/mysql/mysql-5.0.13_rc.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-5.0.13_rc.ebuild,v 1.8 2005/10/24 17:00:19 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-5.0.13_rc.ebuild,v 1.9 2005/10/27 22:17:31 vivo Exp $ inherit eutils flag-o-matic versionator @@ -484,6 +484,18 @@ pkg_preinst() { pkg_postinst() { mysql_get_datadir + # mind at FEATURES=collision-protect before to remove this + #empty dirs... + [ -d "${ROOT}/var/log/mysql" ] \ + || install -d -m0755 -o mysql -g mysql ${ROOT}/var/log/mysql + + #secure the logfiles... does this bother anybody? + touch ${ROOT}/var/log/mysql/mysql.{log,err} + chown mysql:mysql ${ROOT}/var/log/mysql/mysql* + chmod 0660 ${ROOT}/var/log/mysql/mysql* + # secure some directories + chmod 0750 ${ROOT}/var/log/mysql + if ! useq minimal; then # your friendly public service announcement... einfo @@ -491,10 +503,6 @@ pkg_postinst() { einfo "\"emerge --config =${PF}\"" einfo "if this is a new install." einfo - if [[ "${PREVIOUS_DATADIR}" == "yes" ]] ; then - ewarn "Previous datadir found, it's YOUR job to change" - ewarn "ownership and have care of it" - fi fi mysql_upgrade_warning @@ -516,7 +524,7 @@ pkg_config() { local pwd2="b" local maxtry=5 - if [[ -d "${DATADIR}/mysql" ]] ; then + if [[ -d "${ROOT}/${DATADIR}/mysql" ]] ; then ewarn "You have already a MySQL database in place." ewarn "Please rename it or delete it if you wish to replace it." die "MySQL database already exists!" @@ -539,7 +547,7 @@ pkg_config() { ${ROOT}/usr/bin/mysql_install_db || die "MySQL databases not installed" # MySQL 5.0 don't need this - chown -R mysql:mysql ${DATADIR} + chown -R mysql:mysql ${ROOT}/${DATADIR} chmod 0750 ${ROOT}/${DATADIR} local options="" @@ -564,7 +572,7 @@ pkg_config() { ${options} \ --skip-grant-tables \ --basedir=${ROOT}/usr \ - --datadir=${ROOT}/var/lib/mysql \ + --datadir=${ROOT}/${DATADIR} \ --skip-innodb \ --skip-bdb \ --max_allowed_packet=8M \ @@ -600,18 +608,3 @@ pkg_config() { rm "${sqltmp}" einfo "done" } - -pkg_postinst() { - # mind at FEATURES=collision-protect before to remove this - #empty dirs... - [ -d "${ROOT}/var/log/mysql" ] \ - || install -d -m0755 -o mysql -g mysql ${ROOT}/var/log/mysql - - #secure the logfiles... does this bother anybody? - touch ${ROOT}/var/log/mysql/mysql.{log,err} - chown mysql:mysql ${ROOT}/var/log/mysql/mysql* - chmod 0660 ${ROOT}/var/log/mysql/mysql* - # secure some directories - chmod 0750 ${ROOT}/var/log/mysql -} - diff --git a/dev-db/mysql/mysql-5.0.15.ebuild b/dev-db/mysql/mysql-5.0.15.ebuild index 60afb78139de..64383e284347 100644 --- a/dev-db/mysql/mysql-5.0.15.ebuild +++ b/dev-db/mysql/mysql-5.0.15.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-5.0.15.ebuild,v 1.1 2005/10/24 17:00:19 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-5.0.15.ebuild,v 1.2 2005/10/27 22:17:31 vivo Exp $ inherit eutils flag-o-matic versionator @@ -491,24 +491,6 @@ pkg_preinst() { pkg_postinst() { mysql_get_datadir - if ! useq minimal; then - # your friendly public service announcement... - einfo - einfo "You might want to run:" - einfo "\"emerge --config =${PF}\"" - einfo "if this is a new install." - einfo - if [[ "${PREVIOUS_DATADIR}" == "yes" ]] ; then - ewarn "Previous datadir found, it's YOUR job to change" - ewarn "ownership and have care of it" - fi - fi - - mysql_upgrade_warning - einfo "InnoDB is not optional as of MySQL-4.0.24, at the request of upstream." -} - -pkg_postinst() { # mind at FEATURES=collision-protect before to remove this #empty dirs... [ -d "${ROOT}/var/log/mysql" ] \ @@ -520,6 +502,18 @@ pkg_postinst() { chmod 0660 ${ROOT}/var/log/mysql/mysql* # secure some directories chmod 0750 ${ROOT}/var/log/mysql + + if ! useq minimal; then + # your friendly public service announcement... + einfo + einfo "You might want to run:" + einfo "\"emerge --config =${PF}\"" + einfo "if this is a new install." + einfo + fi + + mysql_upgrade_warning + einfo "InnoDB is not optional as of MySQL-4.0.24, at the request of upstream." } pkg_config() { @@ -537,7 +531,7 @@ pkg_config() { local pwd2="b" local maxtry=5 - if [[ -d "${DATADIR}/mysql" ]] ; then + if [[ -d "${ROOT}/${DATADIR}/mysql" ]] ; then ewarn "You have already a MySQL database in place." ewarn "Please rename it or delete it if you wish to replace it." die "MySQL database already exists!" @@ -560,7 +554,7 @@ pkg_config() { ${ROOT}/usr/bin/mysql_install_db || die "MySQL databases not installed" # MySQL 5.0 don't need this - chown -R mysql:mysql ${DATADIR} + chown -R mysql:mysql ${ROOT}/${DATADIR} chmod 0750 ${ROOT}/${DATADIR} local options="" @@ -585,7 +579,7 @@ pkg_config() { ${options} \ --skip-grant-tables \ --basedir=${ROOT}/usr \ - --datadir=${ROOT}/var/lib/mysql \ + --datadir=${ROOT}/${DATADIR} \ --skip-innodb \ --skip-bdb \ --max_allowed_packet=8M \ @@ -621,4 +615,3 @@ pkg_config() { rm "${sqltmp}" einfo "done" } -