diff options
author | Francesco Riosa <vivo@gentoo.org> | 2005-09-20 09:36:10 +0000 |
---|---|---|
committer | Francesco Riosa <vivo@gentoo.org> | 2005-09-20 09:36:10 +0000 |
commit | 925a95cd8ce3d0e41ce82f2e48e98fe991f889e4 (patch) | |
tree | 59f2fc0fcf7b253da617ca60f1520d546eae4a2a /dev-db | |
parent | We do not want the build root in the linked perl module's RUNPATH, so (diff) | |
download | historical-925a95cd8ce3d0e41ce82f2e48e98fe991f889e4.tar.gz historical-925a95cd8ce3d0e41ce82f2e48e98fe991f889e4.tar.bz2 historical-925a95cd8ce3d0e41ce82f2e48e98fe991f889e4.zip |
Fix Bug #106372, depend of psutils enabled only if userland_GNU.\nEnforced up/downgrade block for different versions.\nUsing new mysql-extras, only added patches for old ebuilds.
Package-Manager: portage-2.0.52-r1
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/mysql/ChangeLog | 8 | ||||
-rw-r--r-- | dev-db/mysql/Manifest | 88 | ||||
-rw-r--r-- | dev-db/mysql/files/digest-mysql-4.0.26 | 2 | ||||
-rw-r--r-- | dev-db/mysql/files/digest-mysql-4.1.14 | 2 | ||||
-rw-r--r-- | dev-db/mysql/files/digest-mysql-5.0.12_beta | 2 | ||||
-rw-r--r-- | dev-db/mysql/mysql-4.0.26.ebuild | 41 | ||||
-rw-r--r-- | dev-db/mysql/mysql-4.1.14.ebuild | 44 | ||||
-rw-r--r-- | dev-db/mysql/mysql-5.0.12_beta.ebuild | 41 |
8 files changed, 135 insertions, 93 deletions
diff --git a/dev-db/mysql/ChangeLog b/dev-db/mysql/ChangeLog index cd52a207b021..b2ac1004c7ac 100644 --- a/dev-db/mysql/ChangeLog +++ b/dev-db/mysql/ChangeLog @@ -1,6 +1,12 @@ # 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.238 2005/09/17 10:57:11 kloeri Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/ChangeLog,v 1.239 2005/09/20 09:36:09 vivo Exp $ + + 20 Sep 2005; Francesco Riosa <vivo@gentoo.org> mysql-4.0.26.ebuild, + mysql-4.1.14.ebuild, mysql-5.0.12_beta.ebuild: + - Fix Bug #106372, depend of sys-process/procps enabled only if userland_GNU. + - Enforced up/downgrade block for different versions. + - Using new mysql-extras, only added patches for old ebuilds. 16 Sep 2005; Francesco Riosa <vivo@gentoo.org> mysql-4.1.13-r1.ebuild, mysql-4.1.14.ebuild, mysql-5.0.12_beta.ebuild: diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest index 504c67276d64..56773ee89cd6 100644 --- a/dev-db/mysql/Manifest +++ b/dev-db/mysql/Manifest @@ -1,62 +1,52 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 a2a9fdc7d010a7c04c96cb3b7c05f06b metadata.xml 158 -MD5 0cfd7831f2d57b93e252c0f3d9c25276 mysql-3.23.58-r1.ebuild 7063 -MD5 92fc2eaf2ef09d494ee45b25e57c6087 mysql-4.0.22-r2.ebuild 9569 +MD5 764d5742304c74c3a41ca2751a33bfbb mysql-5.0.12_beta.ebuild 17973 +MD5 2dd5ddcd96ed408fcd1af172ff996f01 mysql-4.1.14.ebuild 17719 +MD5 ef94182bd884e7175eda8f59076ca3f6 mysql-4.0.26.ebuild 14869 +MD5 52296a66343439f293d84dd33ed3eef8 mysql-4.1.13-r1.ebuild 17218 MD5 d168c71df57729ea0eeadab3c6a59f43 mysql-4.0.22.ebuild 8768 +MD5 92fc2eaf2ef09d494ee45b25e57c6087 mysql-4.0.22-r2.ebuild 9569 +MD5 0cfd7831f2d57b93e252c0f3d9c25276 mysql-3.23.58-r1.ebuild 7063 MD5 de9bc44b9100cfff7b5ee2296d727910 mysql-4.0.24.ebuild 9840 +MD5 97a485cb772abccc2443d5ef4e2ed3cc ChangeLog 41837 +MD5 a2a9fdc7d010a7c04c96cb3b7c05f06b metadata.xml 158 MD5 06056877b1940a0df66415d32bbe782c mysql-4.0.25-r2.ebuild 13805 -MD5 52296a66343439f293d84dd33ed3eef8 mysql-4.1.13-r1.ebuild 17218 -MD5 9e2baa8ae76386409253a0680e8c2edc mysql-4.1.14.ebuild 17636 -MD5 2bc9d86719acedfa6a78534b9a12f914 mysql-5.0.12_beta.ebuild 17762 -MD5 6f9d7b6c5292d432e859729eecd426a0 mysql-4.0.26.ebuild 13674 -MD5 0c92f68f854eba58ce4dfec50b8158ad ChangeLog 41519 -MD5 d0fbdf4e41f2b52210eef6cb3a53e128 files/mysql-4.0.24-r1.rc6 1662 -MD5 d3f7b593978d1620e8070552ab4f86bb files/010_all_my-print-defaults-r2.patch 908 -MD5 08f1246e8107e4140378d429ff9773af files/mysql-4.0.24-r2.rc6 2123 -MD5 a868ff3e6a328acbed6842fdd17c8cdf files/035_x86_asm-pic-fixes-r1.patch 4102 +MD5 a755fb5a3ed724046a4f83fafd819c77 files/mysql-test-myisam-geometry.patch 1217 +MD5 76446c512e91b2f8e9e69a0379178e5c files/mysql-4.0.25-r2-asm-pic-fixes.patch 7295 +MD5 e37e03b4ce894ff87fda12ce6f7b31a6 files/mysql-4.0.21-install-db-sh.diff 585 +MD5 ad883e978e48b2040477a12951c01806 files/digest-mysql-4.1.13-r1 66 MD5 237315cdafd5415390df78dec50669e9 files/035_x86_asm-pic-fixes-r2.patch 8201 -MD5 3d755bbd0b109ec0397b0ce50b4a554d files/mysql-accesstmp.patch 3393 -MD5 c46a8d39ac5d7568ff42b7c3ccce5e1d files/701_all_test-myisam-geometry.patch 1259 -MD5 73be6460f548f6f73c70246a4cfd13a0 files/mysql.init 886 -MD5 9209843349ac5e9560f9ad7450c49769 files/703_all_test-rpl_rotate_logs.patch 802 +MD5 625b4007f035e3da9a4f1eeee1db6b9c files/mysql-4.0.15.rc6 1187 MD5 6e0ae36e30287df25336d8bd71c0e764 files/digest-mysql-3.23.58-r1 67 +MD5 8eaeb1372c41d2fef1622dd707a7a9d0 files/mysql-3.23-nisam.h.diff 452 +MD5 58c4d09c5c2712254b1881a6fcc7abff files/mysql-4.0.18-gentoo-nptl.diff 587 +MD5 ae611d4c9c9ace8e80092ae9568ce22e files/digest-mysql-5.0.12_beta 144 +MD5 087f3fbbe8e3385f5408d91cb661aace files/mysql-4.0-mysqlhotcopy-security.patch 1394 MD5 04fa914460358170e2865d20b22d2171 files/digest-mysql-4.0.22 66 -MD5 a0f56eeed1704232e3b56ecba599d38a files/digest-mysql-4.0.22-r2 139 -MD5 228ba118e90b78411917acdd15ebee66 files/digest-mysql-5.0.12_beta 144 MD5 a752e07babd8812e2bd5629470fc9578 files/digest-mysql-4.0.24 139 -MD5 726c2db19d163113d218d25d8a55e00a files/digest-mysql-4.1.14 139 -MD5 6799fc7139b1044f7c9f84f29ccc6015 files/digest-mysql-4.0.25-r2 139 -MD5 ad883e978e48b2040477a12951c01806 files/digest-mysql-4.1.13-r1 66 -MD5 afbd9a0788032f51caf036064836992f files/digest-mysql-4.0.26 139 +MD5 dd06ee73caa6600251957b2c3c0e14c7 files/digest-mysql-4.0.26 139 +MD5 9e4f32959c5991f8d89f1d5d7eff604b files/digest-mysql-4.1.14 139 +MD5 ff80a5d8d87212046e89f2f8ae779af4 files/mysql-4.0-nisam.h.diff 452 +MD5 9209843349ac5e9560f9ad7450c49769 files/703_all_test-rpl_rotate_logs.patch 802 +MD5 73be6460f548f6f73c70246a4cfd13a0 files/mysql.init 886 +MD5 6d4fc135a2143e95681416795d1948d9 files/mysql-4.0.23-install-db-sh.diff 1055 +MD5 d20c23adca5b8731ebfab4d1b5771dab files/mysql-4.0.18-mysqld-safe-sh.diff 1307 +MD5 d3f7b593978d1620e8070552ab4f86bb files/010_all_my-print-defaults-r2.patch 908 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 7a5badec9c28c2f4d434d6aed0a5103b files/mysql-3.23-my-print-defaults.diff 218 -MD5 8eaeb1372c41d2fef1622dd707a7a9d0 files/mysql-3.23-nisam.h.diff 452 -MD5 8d51cbf3afa8349839380aa0986704c0 files/mysql-3.23-safe-mysqld-sh.diff 1557 MD5 50629599f478b26b4ca82c7c553feae0 files/mysql-3.23.52-install-db-sh.diff 1366 MD5 d1e79f7a155e45c69558f083fcb1139d files/mysql-4.0-my-print-defaults.diff 240 -MD5 087f3fbbe8e3385f5408d91cb661aace files/mysql-4.0-mysqlhotcopy-security.patch 1394 -MD5 ff80a5d8d87212046e89f2f8ae779af4 files/mysql-4.0-nisam.h.diff 452 -MD5 977be6c68f6231cbcf1febd3305ade5d files/mysql-4.0.14-r1-tcpd-vars-fix.diff 465 -MD5 625b4007f035e3da9a4f1eeee1db6b9c files/mysql-4.0.15.rc6 1187 -MD5 58c4d09c5c2712254b1881a6fcc7abff files/mysql-4.0.18-gentoo-nptl.diff 587 -MD5 d20c23adca5b8731ebfab4d1b5771dab files/mysql-4.0.18-mysqld-safe-sh.diff 1307 -MD5 e37e03b4ce894ff87fda12ce6f7b31a6 files/mysql-4.0.21-install-db-sh.diff 585 +MD5 3d755bbd0b109ec0397b0ce50b4a554d files/mysql-accesstmp.patch 3393 MD5 8af497943e1a29aa0a0c6b17af54b116 files/mysql-4.0.21-thrssl.patch 318 -MD5 6d4fc135a2143e95681416795d1948d9 files/mysql-4.0.23-install-db-sh.diff 1055 -MD5 c6ff193b0612040bab879d2085b6edea files/mysql-4.0.24-manual.texi.patch 603 -MD5 76446c512e91b2f8e9e69a0379178e5c files/mysql-4.0.25-r2-asm-pic-fixes.patch 7295 +MD5 277705080f05b5b98b815487e080e562 files/my.cnf-4.1 4068 +MD5 8d51cbf3afa8349839380aa0986704c0 files/mysql-3.23-safe-mysqld-sh.diff 1557 +MD5 7a5badec9c28c2f4d434d6aed0a5103b files/mysql-3.23-my-print-defaults.diff 218 +MD5 c46a8d39ac5d7568ff42b7c3ccce5e1d files/701_all_test-myisam-geometry.patch 1259 MD5 66b1e90f93ae0adc106e7b62a2c4043b files/mysql-4.1.9-thrssl.patch 905 -MD5 a755fb5a3ed724046a4f83fafd819c77 files/mysql-test-myisam-geometry.patch 1217 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2 (GNU/Linux) - -iD8DBQFDK/acKf2g/qXtneoRAsyoAJ90y4M3wO0DQhJC9atEm9O3OZjasQCfa4bg -8+So7U/aRydRYTYFR/DVuxk= -=vX7m ------END PGP SIGNATURE----- +MD5 d0fbdf4e41f2b52210eef6cb3a53e128 files/mysql-4.0.24-r1.rc6 1662 +MD5 08f1246e8107e4140378d429ff9773af files/mysql-4.0.24-r2.rc6 2123 +MD5 977be6c68f6231cbcf1febd3305ade5d files/mysql-4.0.14-r1-tcpd-vars-fix.diff 465 +MD5 c6ff193b0612040bab879d2085b6edea files/mysql-4.0.24-manual.texi.patch 603 +MD5 a8f89d11a0913332c5f8c1da5a21cc3f files/my.cnf-4.0.14-r1 2816 +MD5 9946a8f7163970ec4f6a713c97eadbe0 files/my.cnf-4.0.24-r1 4271 +MD5 a0f56eeed1704232e3b56ecba599d38a files/digest-mysql-4.0.22-r2 139 +MD5 6799fc7139b1044f7c9f84f29ccc6015 files/digest-mysql-4.0.25-r2 139 +MD5 a868ff3e6a328acbed6842fdd17c8cdf files/035_x86_asm-pic-fixes-r1.patch 4102 diff --git a/dev-db/mysql/files/digest-mysql-4.0.26 b/dev-db/mysql/files/digest-mysql-4.0.26 index bf700d24baf8..0b13a499cd73 100644 --- a/dev-db/mysql/files/digest-mysql-4.0.26 +++ b/dev-db/mysql/files/digest-mysql-4.0.26 @@ -1,2 +1,2 @@ MD5 4e2060a3875470e0d853391e8647a019 mysql-4.0.26.tar.gz 11144366 -MD5 adaf3f0e5174f968bef0f910aff65f7d mysql-extras-20050908.tar.bz2 46663 +MD5 afb83d76259603f3a02837fad080fa7d mysql-extras-20050919.tar.bz2 49853 diff --git a/dev-db/mysql/files/digest-mysql-4.1.14 b/dev-db/mysql/files/digest-mysql-4.1.14 index 6bad0e94a5d6..6cccb93672bb 100644 --- a/dev-db/mysql/files/digest-mysql-4.1.14 +++ b/dev-db/mysql/files/digest-mysql-4.1.14 @@ -1,2 +1,2 @@ MD5 98ba9caea24b0a48ee06bb242ff2e37f mysql-4.1.14.tar.gz 17074439 -MD5 adaf3f0e5174f968bef0f910aff65f7d mysql-extras-20050908.tar.bz2 46663 +MD5 afb83d76259603f3a02837fad080fa7d mysql-extras-20050919.tar.bz2 49853 diff --git a/dev-db/mysql/files/digest-mysql-5.0.12_beta b/dev-db/mysql/files/digest-mysql-5.0.12_beta index 1432ec006155..a19fb76f817b 100644 --- a/dev-db/mysql/files/digest-mysql-5.0.12_beta +++ b/dev-db/mysql/files/digest-mysql-5.0.12_beta @@ -1,2 +1,2 @@ MD5 52ce66773505a9128accc64b44d1ecf2 mysql-5.0.12-beta.tar.gz 18798040 -MD5 adaf3f0e5174f968bef0f910aff65f7d mysql-extras-20050908.tar.bz2 46663 +MD5 afb83d76259603f3a02837fad080fa7d mysql-extras-20050919.tar.bz2 49853 diff --git a/dev-db/mysql/mysql-4.0.26.ebuild b/dev-db/mysql/mysql-4.0.26.ebuild index 97445b05a9ec..efd0ad19b630 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.5 2005/09/12 14:58:15 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.26.ebuild,v 1.6 2005/09/20 09:36:10 vivo Exp $ inherit eutils gnuconfig flag-o-matic versionator @@ -15,7 +15,7 @@ S="${WORKDIR}/${PN}" DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" HOMEPAGE="http://www.mysql.com/" SRC_URI="mirror://mysql/Downloads/MySQL-${SVER}/${NEWP}.tar.gz - mirror://gentoo/mysql-extras-20050908.tar.bz2" + mirror://gentoo/mysql-extras-20050919.tar.bz2" LICENSE="GPL-2" SLOT="0" @@ -28,15 +28,28 @@ DEPEND="readline? ( >=sys-libs/readline-4.1 ) tcpd? ( >=sys-apps/tcp-wrappers-7.6-r6 ) ssl? ( >=dev-libs/openssl-0.9.6d ) perl? ( dev-lang/perl ) + userland_GNU? ( sys-process/procps ) >=sys-libs/zlib-1.2.3 >=sys-apps/texinfo-4.7-r1 - sys-process/procps >=sys-apps/sed-4" RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )" # dev-perl/DBD-mysql is needed by some scripts installed by MySQL PDEPEND="perl? ( dev-perl/DBD-mysql )" +mysql_upgrade_error() { + ewarn "Sorry, plain up/downgrade between different version of MySQL is (still)" + ewarn "un-supported." + ewarn "Some gentoo documentation on how to do it:" + ewarn "http://www.gentoo.org/doc/en/mysql-upgrading.xml" + ewarn "Also on the MySQL website:" + ewarn "http://dev.mysql.com/doc/mysql/en/upgrading-from-4-0.html" + ewarn "" + ewarn "You can also choose to preview some new MySQL 4.1 behaviour" + ewarn "adding a section \"[mysqld-4.0]\" followed by the word \"new\"" + ewarn "into /etc/mysql/my.cnf (you need a recent MySQL version)" +} + mysql_upgrade_warning() { ewarn ewarn "If you're upgrading from MySQL-3.x to 4.0, or 4.0.x to 4.1.x, you" @@ -81,8 +94,28 @@ mysql_get_datadir() { } pkg_setup() { + + if [[ -z $MYSQL_STRAIGHT_UPGRADE ]] ; then + mysql_get_datadir + local curversion="dev-db/${PN}-${PV%.*}" + local oldversion="$(best_version dev-db/mysql)" + oldversion=${oldversion%.*} + + # permit upgrade from old version if it's safe + useq minimal && oldversion="" + built_with_use dev-db/mysql minimal && oldversion="" + [[ -d "${DATADIR}/mysql" ]] || oldversion="" + + if [[ -n "${oldversion}" ]] && [[ "${oldversion}" != "${curversion}" ]] + then + mysql_upgrade_error + eerror "MySQL-${oldversion} found, up/downgrade to \"${curversion}\" is unsupported" + eerror "export MYSQL_STRAIGHT_UPGRADE=1 to force" + die + fi + fi + mysql_upgrade_warning - mysql_get_datadir enewgroup mysql 60 || die "problem adding group mysql" enewuser mysql 60 -1 /dev/null mysql \ diff --git a/dev-db/mysql/mysql-4.1.14.ebuild b/dev-db/mysql/mysql-4.1.14.ebuild index 26c4d3607aaf..cc60973e38e1 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.6 2005/09/16 08:34:02 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.1.14.ebuild,v 1.7 2005/09/20 09:36:10 vivo Exp $ inherit eutils gnuconfig flag-o-matic versionator @@ -16,7 +16,7 @@ S="${WORKDIR}/${PN}" DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" HOMEPAGE="http://www.mysql.com/" SRC_URI="mirror://mysql/Downloads/MySQL-${SVER}/${NEWP}.tar.gz - mirror://gentoo/mysql-extras-20050908.tar.bz2" + mirror://gentoo/mysql-extras-20050919.tar.bz2" LICENSE="GPL-2" SLOT="0" @@ -29,9 +29,9 @@ DEPEND="readline? ( >=sys-libs/readline-4.1 ) tcpd? ( >=sys-apps/tcp-wrappers-7.6-r6 ) ssl? ( >=dev-libs/openssl-0.9.6d ) perl? ( dev-lang/perl ) + userland_GNU? ( sys-process/procps ) >=sys-libs/zlib-1.2.3 >=sys-apps/texinfo-4.7-r1 - sys-process/procps >=sys-apps/sed-4" RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )" # dev-perl/DBD-mysql is needed by some scripts installed by MySQL @@ -42,16 +42,12 @@ if version_is_at_least "4.1.3" ; then fi mysql_upgrade_error() { - mysql_get_datadir - ewarn "Sorry plain upgrade from version of MySQL before 4.1.4 is NOT supported." - ewarn "Be sure to read \"Upgrading from version 4.0 to 4.1\" section" + ewarn "Sorry, plain up/downgrade between different version of MySQL is (still)" + ewarn "un-supported." + ewarn "Some gentoo documentation on how to do it:" + ewarn "http://www.gentoo.org/doc/en/mysql-upgrading.xml" + ewarn "Also on the MySQL website:" ewarn "http://dev.mysql.com/doc/mysql/en/upgrading-from-4-0.html" - ewarn "then unmerge previous version of MySQL with" - ewarn "#emerge -C dev-db/mysql" - ewarn "move your data out of \"${DATADIR}\"" - ewarn "#emerge =dev-db/${P}" - ewarn "reload data you dumped with \"mysqldump\" Because you have read " - ewarn "the documentation on how to upgrade" ewarn "" ewarn "You can also choose to preview some new MySQL 4.1 behaviour" ewarn "adding a section \"[mysqld-4.0]\" followed by the word \"new\"" @@ -99,17 +95,27 @@ mysql_get_datadir() { } pkg_setup() { + if [[ -z $MYSQL_STRAIGHT_UPGRADE ]] ; then mysql_get_datadir - if ! useq minimal && version_is_at_least "4.1.4"; then - if has_version "<=dev-db/mysql-4.1.4" \ - && ! built_with_use dev-db/mysql minimal \ - && [ -d "${DATADIR}/mysql" ]; then - mysql_upgrade_error - die "plain upgrade unsupported, export MYSQL_STRAIGHT_UPGRADE=1 to force upgrade" - fi + local local curversion="dev-db/${PN}-${PV%.*}" + local oldversion="$(best_version dev-db/mysql)" + oldversion=${oldversion%.*} + + # permit upgrade from old version if it's safe + useq minimal && oldversion="" + built_with_use dev-db/mysql minimal && oldversion="" + [[ -d "${DATADIR}/mysql" ]] || oldversion="" + + if [[ -n "${oldversion}" ]] && [[ "${oldversion}" != "${curversion}" ]] + then + mysql_upgrade_error + eerror "MySQL-${oldversion} found, up/downgrade to \"${curversion}\" is unsupported" + eerror "export MYSQL_STRAIGHT_UPGRADE=1 to force" + die fi fi + mysql_upgrade_warning enewgroup mysql 60 || die "problem adding group mysql" diff --git a/dev-db/mysql/mysql-5.0.12_beta.ebuild b/dev-db/mysql/mysql-5.0.12_beta.ebuild index 33907a6f2483..eb59048bde5f 100644 --- a/dev-db/mysql/mysql-5.0.12_beta.ebuild +++ b/dev-db/mysql/mysql-5.0.12_beta.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.12_beta.ebuild,v 1.8 2005/09/16 08:34:02 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-5.0.12_beta.ebuild,v 1.9 2005/09/20 09:36:10 vivo Exp $ inherit eutils flag-o-matic versionator @@ -16,7 +16,7 @@ S="${WORKDIR}/${PN}" DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" HOMEPAGE="http://www.mysql.com/" SRC_URI="mirror://mysql/Downloads/MySQL-${SVER}/${NEWP}.tar.gz - mirror://gentoo/mysql-extras-20050908.tar.bz2" + mirror://gentoo/mysql-extras-20050919.tar.bz2" LICENSE="GPL-2" SLOT="0" @@ -28,9 +28,9 @@ DEPEND="readline? ( >=sys-libs/readline-4.1 ) bdb? ( sys-apps/ed ) ssl? ( >=dev-libs/openssl-0.9.6d ) perl? ( dev-lang/perl ) + userland_GNU? ( sys-process/procps ) >=sys-libs/zlib-1.2.3 >=sys-apps/texinfo-4.7-r1 - sys-process/procps >=sys-apps/sed-4" RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )" # dev-perl/DBD-mysql is needed by some scripts installed by MySQL @@ -41,16 +41,12 @@ if version_is_at_least "4.1.3" ; then fi mysql_upgrade_error() { - mysql_get_datadir - ewarn "Sorry plain upgrade from version of MySQL before 4.1.4 is NOT supported." - ewarn "Be sure to read \"Upgrading from version 4.0 to 4.1\" section" + ewarn "Sorry, plain up/downgrade between different version of MySQL is (still)" + ewarn "un-supported." + ewarn "Some gentoo documentation on how to do it:" + ewarn "http://www.gentoo.org/doc/en/mysql-upgrading.xml" + ewarn "Also on the MySQL website:" ewarn "http://dev.mysql.com/doc/mysql/en/upgrading-from-4-0.html" - ewarn "then unmerge previous version of MySQL with" - ewarn "#emerge -C dev-db/mysql" - ewarn "move your data out of \"${DATADIR}\"" - ewarn "#emerge =dev-db/${P}" - ewarn "reload data you dumped with \"mysqldump\" Because you have read " - ewarn "the documentation on how to upgrade" ewarn "" ewarn "You can also choose to preview some new MySQL 4.1 behaviour" ewarn "adding a section \"[mysqld-4.0]\" followed by the word \"new\"" @@ -99,12 +95,22 @@ mysql_get_datadir() { pkg_setup() { - mysql_get_datadir - if ! useq minimal && version_is_at_least "4.1.4"; then - if has_version "<=dev-db/mysql-4.1.4" \ - && ! built_with_use dev-db/mysql minimal \ - && [ -d "${DATADIR}/mysql" ]; then + if [[ -z $MYSQL_STRAIGHT_UPGRADE ]] ; then + mysql_get_datadir + local curversion="dev-db/${PN}-${PV%.*}" + local oldversion="$(best_version dev-db/mysql)" + oldversion=${oldversion%.*} + + # permit upgrade from old version if it's safe + useq minimal && oldversion="" + built_with_use dev-db/mysql minimal && oldversion="" + [[ -d "${DATADIR}/mysql" ]] || oldversion="" + + if [[ -n "${oldversion}" ]] && [[ "${oldversion}" != "${curversion}" ]] + then mysql_upgrade_error + eerror "MySQL-${oldversion} found, up/downgrade to \"${curversion}\" is unsupported" + eerror "export MYSQL_STRAIGHT_UPGRADE=1 to force" die fi fi @@ -114,6 +120,7 @@ pkg_setup() { enewgroup mysql 60 || die "problem adding group mysql" enewuser mysql 60 -1 /dev/null mysql \ || die "problem adding user mysql" + } src_unpack() { |