summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2006-12-18 22:56:12 +0000
committerTiziano Müller <dev-zero@gentoo.org>2006-12-18 22:56:12 +0000
commit7d9389b5512edd332e8e3f82b98dc70c706ef126 (patch)
tree9b678bbcb932546bf86e53488f5caf6d25e6e456 /dev-db
parentAdding new version not building against fox-1.0 anymore (diff)
downloadhistorical-7d9389b5512edd332e8e3f82b98dc70c706ef126.tar.gz
historical-7d9389b5512edd332e8e3f82b98dc70c706ef126.tar.bz2
historical-7d9389b5512edd332e8e3f82b98dc70c706ef126.zip
Added a new check for pg-hier USE-flag
Package-Manager: portage-2.1.2_rc3
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/postgresql/ChangeLog6
-rw-r--r--dev-db/postgresql/Manifest24
-rw-r--r--dev-db/postgresql/postgresql-7.4.14.ebuild42
-rw-r--r--dev-db/postgresql/postgresql-8.0.9-r1.ebuild42
4 files changed, 83 insertions, 31 deletions
diff --git a/dev-db/postgresql/ChangeLog b/dev-db/postgresql/ChangeLog
index 423477999cb0..ca3c04790ea5 100644
--- a/dev-db/postgresql/ChangeLog
+++ b/dev-db/postgresql/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-db/postgresql
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.314 2006/12/18 14:34:40 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.315 2006/12/18 22:56:12 dev-zero Exp $
+
+ 18 Dec 2006; Tiziano Müller <dev-zero@gentoo.org>
+ postgresql-7.4.14.ebuild, postgresql-8.0.9-r1.ebuild:
+ Added a new check for pg-hier USE-flag
18 Dec 2006; Tiziano Müller <dev-zero@gentoo.org>
postgresql-7.4.14.ebuild, postgresql-8.0.9-r1.ebuild:
diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index 192ee1e35430..73457ac284bd 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -161,26 +161,26 @@ EBUILD postgresql-7.4.13.ebuild 10706 RMD160 b0d2ff978b1e4c1cadbd2e79c3229688bd1
MD5 c970674fff433171fc0e2231e3be1035 postgresql-7.4.13.ebuild 10706
RMD160 b0d2ff978b1e4c1cadbd2e79c3229688bd1111e5 postgresql-7.4.13.ebuild 10706
SHA256 aaf22899f43a413ba55c771d6ca542986c64b0d21c3c41ac7301708156745240 postgresql-7.4.13.ebuild 10706
-EBUILD postgresql-7.4.14.ebuild 8329 RMD160 03378b58547554d427ec5a7f046dafa42d9cca64 SHA1 9eb2800e5e9ce6cf6e239191ad838b590d75728b SHA256 bd18e71360107d2f66800a9ab02d83f2e419f044dbbb0719aff9e9de19c20a1a
-MD5 0eef8c3f21e9feca6930aa2130ef5dc4 postgresql-7.4.14.ebuild 8329
-RMD160 03378b58547554d427ec5a7f046dafa42d9cca64 postgresql-7.4.14.ebuild 8329
-SHA256 bd18e71360107d2f66800a9ab02d83f2e419f044dbbb0719aff9e9de19c20a1a postgresql-7.4.14.ebuild 8329
+EBUILD postgresql-7.4.14.ebuild 9610 RMD160 eb84806b29ccd558f16a55d0919614eecce822c0 SHA1 5a740725fd76ce75fef9f296b3748df93094a100 SHA256 96975134f0dff007f65cad5bb420c35cbb6d7437a1240bb1593c507d45189ff4
+MD5 0adbd510e5abefdb1fc8bc408fbfa13c postgresql-7.4.14.ebuild 9610
+RMD160 eb84806b29ccd558f16a55d0919614eecce822c0 postgresql-7.4.14.ebuild 9610
+SHA256 96975134f0dff007f65cad5bb420c35cbb6d7437a1240bb1593c507d45189ff4 postgresql-7.4.14.ebuild 9610
EBUILD postgresql-8.0.8.ebuild 7671 RMD160 d820ff2188af6bb6d90ce81e59434187dc4a51f9 SHA1 3567eafb1099f3bd8894881e9c73ad945465aa03 SHA256 6e953e8ce3b6e057022fc2c08569f221dde779c595562b9597ffed2fdf310591
MD5 e5593b676c330eb0f88e49a7a363e5d0 postgresql-8.0.8.ebuild 7671
RMD160 d820ff2188af6bb6d90ce81e59434187dc4a51f9 postgresql-8.0.8.ebuild 7671
SHA256 6e953e8ce3b6e057022fc2c08569f221dde779c595562b9597ffed2fdf310591 postgresql-8.0.8.ebuild 7671
-EBUILD postgresql-8.0.9-r1.ebuild 8309 RMD160 69ac409f210f1ef6b4da6b462c02301a073c8e44 SHA1 a83255c78b51afb3107f75b9ec87dbda5c51a12f SHA256 4d1fbd3573e7038325d39388aef46814a4a8abb3e121ad7191213c834704a7de
-MD5 301cc55d3bf1dcc070e57be0769f2994 postgresql-8.0.9-r1.ebuild 8309
-RMD160 69ac409f210f1ef6b4da6b462c02301a073c8e44 postgresql-8.0.9-r1.ebuild 8309
-SHA256 4d1fbd3573e7038325d39388aef46814a4a8abb3e121ad7191213c834704a7de postgresql-8.0.9-r1.ebuild 8309
+EBUILD postgresql-8.0.9-r1.ebuild 9590 RMD160 6e2cf04bc9d6d0146afc5a4ddf22117cd0329513 SHA1 bb7e28c512835ce74efffc2ef7476766481186f1 SHA256 a5dce95a7969a3d3c209f198f4002da9473a8c7ff5d9f3da711d7fbb344c7bc8
+MD5 c75c5023204673f277ccbc00540ec9b8 postgresql-8.0.9-r1.ebuild 9590
+RMD160 6e2cf04bc9d6d0146afc5a4ddf22117cd0329513 postgresql-8.0.9-r1.ebuild 9590
+SHA256 a5dce95a7969a3d3c209f198f4002da9473a8c7ff5d9f3da711d7fbb344c7bc8 postgresql-8.0.9-r1.ebuild 9590
EBUILD postgresql-8.1.5-r1.ebuild 8497 RMD160 aec3c8a4220aba7ebe8c1e7defb136a83202df5a SHA1 37815c785fece4cee463e458f8b568179f393239 SHA256 ebb92b2ab9d435033a33b1695f164cca7055dea17c463dd8c834a9f4c2a57a0a
MD5 ca1c9142e329325d94a0c8a168f67b50 postgresql-8.1.5-r1.ebuild 8497
RMD160 aec3c8a4220aba7ebe8c1e7defb136a83202df5a postgresql-8.1.5-r1.ebuild 8497
SHA256 ebb92b2ab9d435033a33b1695f164cca7055dea17c463dd8c834a9f4c2a57a0a postgresql-8.1.5-r1.ebuild 8497
-MISC ChangeLog 66949 RMD160 21d968385b05fe4a631965bfd079e3880abf641b SHA1 7e285745b2a41eb29e0e52b971cbe17794dd4829 SHA256 7fa3ebc22df471361bf64d4e67020b8d1ccc856f4ba598d5d7e00987019814de
-MD5 40d9edcc5586a23a797d3fb3e9a43215 ChangeLog 66949
-RMD160 21d968385b05fe4a631965bfd079e3880abf641b ChangeLog 66949
-SHA256 7fa3ebc22df471361bf64d4e67020b8d1ccc856f4ba598d5d7e00987019814de ChangeLog 66949
+MISC ChangeLog 67100 RMD160 5e0b937af2eef7b9743c8a19484a0b58170a738b SHA1 136dd6b978dc4a826bf15c45fe838beeb42dc5a4 SHA256 154479d0c21eb8784a1bcca7d805c67160d72779bbd38ce4f107c23228ff9f8b
+MD5 b1a33207a484684d91caed0a7c9035f3 ChangeLog 67100
+RMD160 5e0b937af2eef7b9743c8a19484a0b58170a738b ChangeLog 67100
+SHA256 154479d0c21eb8784a1bcca7d805c67160d72779bbd38ce4f107c23228ff9f8b ChangeLog 67100
MISC metadata.xml 164 RMD160 becfe652663bd65719dd11fa6ffb588b3d5b4ecc SHA1 f67b7ac1c5e6e65ef5a19a589d4759c84918f86c SHA256 7e8e8126bc8701c4a42c7dfed8bb755ac6040fe3d0e3f994d888f8b2b4fa7d8b
MD5 6fe52df942ef15801d56449cd8299604 metadata.xml 164
RMD160 becfe652663bd65719dd11fa6ffb588b3d5b4ecc metadata.xml 164
diff --git a/dev-db/postgresql/postgresql-7.4.14.ebuild b/dev-db/postgresql/postgresql-7.4.14.ebuild
index 1bf317f8dceb..110f467343e6 100644
--- a/dev-db/postgresql/postgresql-7.4.14.ebuild
+++ b/dev-db/postgresql/postgresql-7.4.14.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/postgresql/postgresql-7.4.14.ebuild,v 1.14 2006/12/18 14:34:40 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-7.4.14.ebuild,v 1.15 2006/12/18 22:56:12 dev-zero Exp $
inherit eutils gnuconfig flag-o-matic multilib toolchain-funcs versionator
@@ -37,15 +37,39 @@ DEPEND="${RDEPEND}
PG_DIR="/var/lib/postgresql"
[[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS="512"
+cluster_exists() {
+ [[ -f "${PG_DIR}/data/PG_VERSION" ]] && return 0
+ return 1
+}
+
pkg_setup() {
- if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then
- if [[ $(cat "${PG_DIR}/data/PG_VERSION") != $(get_version_component_range 1-2) ]] ; then
- eerror "PostgreSQL ${PV} cannot upgrade your existing databases, you must"
- eerror "use pg_dump to export your existing databases to a file, and then"
- eerror "pg_restore to import them when you have upgraded completely."
- eerror "You must remove your entire database directory to continue."
- eerror "(database directory = ${PG_DIR})."
- die "Remove your database directory to continue"
+ if hasq pg-hier ${USE} ; then
+ ewarn "Warning: pg-hier USE-flag detected:"
+ ewarn "The hier-patch has been dropped for this version and the pg-hier USE-flag is therefore deprecated."
+ ewarn "If you really used the 'hier' patch in your database with the 'CONNECT BY' statement,"
+ ewarn "you should stop now and reconsider. You will be able to reuse your data, but not"
+ ewarn "any VIEWS or QUERIES based on that statement."
+ ewarn "Please disable the pg-hier USE-flag!"
+ ebeep 3
+ if cluster_exists ; then
+ eerror "There is already a database in '${PG_DIR}/data' and you have the pg-hier USE-flag set."
+ eerror "Please read the message above first. If you decide that the warnings there don't"
+ eerror "apply to your situation, dump the database using pg_dump and move the '${PG_DIR}/data'"
+ eerror "away. Then restart the merge. After that create a new database cluster and use pg_restore to"
+ eerror "re-import the previously dumped data."
+ eerror "Moving '${PG_DIR}/data' temporarely away or just disable the 'pg-hier' USE-flag won't work."
+ die "Can't update this database."
+ fi
+ fi
+ if cluster_exists ; then
+ local cluster_version=$(cat "${PG_DIR}/data/PG_VERSION")
+ if [[ ${cluster_version} != $(get_version_component_range 1-2) ]] ; then
+ eerror "There is a database in '${PG_DIR}/data' from PostgreSQL version ${cluster_version}."
+ eerror "PostgreSQL doesn't support upgrades between major versions, you have to use pg_dump"
+ eerror "to dump your existing database. Then move your '${PG_DIR}/data' directory away and"
+ eerror "restart the merge. After that create a new database cluster and use pg_restore to"
+ eerror "re-import the previously dumped data."
+ die "Can't update this database."
fi
fi
diff --git a/dev-db/postgresql/postgresql-8.0.9-r1.ebuild b/dev-db/postgresql/postgresql-8.0.9-r1.ebuild
index 6cbb4ca63bee..3a7599f24db8 100644
--- a/dev-db/postgresql/postgresql-8.0.9-r1.ebuild
+++ b/dev-db/postgresql/postgresql-8.0.9-r1.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/postgresql/postgresql-8.0.9-r1.ebuild,v 1.10 2006/12/18 14:34:40 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-8.0.9-r1.ebuild,v 1.11 2006/12/18 22:56:12 dev-zero Exp $
inherit eutils gnuconfig flag-o-matic multilib toolchain-funcs versionator
@@ -37,15 +37,39 @@ DEPEND="${RDEPEND}
PG_DIR="/var/lib/postgresql"
[[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS="512"
+cluster_exists() {
+ [[ -f "${PG_DIR}/data/PG_VERSION" ]] && return 0
+ return 1
+}
+
pkg_setup() {
- if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then
- if [[ $(cat "${PG_DIR}/data/PG_VERSION") != $(get_version_component_range 1-2) ]] ; then
- eerror "PostgreSQL ${PV} cannot upgrade your existing databases, you must"
- eerror "use pg_dump to export your existing databases to a file, and then"
- eerror "pg_restore to import them when you have upgraded completely."
- eerror "You must remove your entire database directory to continue."
- eerror "(database directory = ${PG_DIR})."
- die "Remove your database directory to continue"
+ if hasq pg-hier ${USE} ; then
+ ewarn "Warning: pg-hier USE-flag detected:"
+ ewarn "The hier-patch has been dropped for this version and the pg-hier USE-flag is therefore deprecated."
+ ewarn "If you really used the 'hier' patch in your database with the 'CONNECT BY' statement,"
+ ewarn "you should stop now and reconsider. You will be able to reuse your data, but not"
+ ewarn "any VIEWS or QUERIES based on that statement."
+ ewarn "Please disable the pg-hier USE-flag!"
+ ebeep 3
+ if cluster_exists ; then
+ eerror "There is already a database in '${PG_DIR}/data' and you have the pg-hier USE-flag set."
+ eerror "Please read the message above first. If you decide that the warnings there don't"
+ eerror "apply to your situation, dump the database using pg_dump and move the '${PG_DIR}/data'"
+ eerror "away. Then restart the merge. After that create a new database cluster and use pg_restore to"
+ eerror "re-import the previously dumped data."
+ eerror "Moving '${PG_DIR}/data' temporarely away or just disable the 'pg-hier' USE-flag won't work."
+ die "Can't update this database."
+ fi
+ fi
+ if cluster_exists ; then
+ local cluster_version=$(cat "${PG_DIR}/data/PG_VERSION")
+ if [[ ${cluster_version} != $(get_version_component_range 1-2) ]] ; then
+ eerror "There is a database in '${PG_DIR}/data' from PostgreSQL version ${cluster_version}."
+ eerror "PostgreSQL doesn't support upgrades between major versions, you have to use pg_dump"
+ eerror "to dump your existing database. Then move your '${PG_DIR}/data' directory away and"
+ eerror "restart the merge. After that create a new database cluster and use pg_restore to"
+ eerror "re-import the previously dumped data."
+ die "Can't update this database."
fi
fi