summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2004-07-05 01:24:31 +0000
committerMarius Mauch <genone@gentoo.org>2004-07-05 01:24:31 +0000
commit849d737b98280869b4846c1218e639c2673a48f9 (patch)
treeb795ba15aa43878c71c9db66d2971e977bd6307a /sys-libs/glibc/glibc-2.3.2-r9.ebuild
parentStable on x86. (diff)
downloadhistorical-849d737b98280869b4846c1218e639c2673a48f9.tar.gz
historical-849d737b98280869b4846c1218e639c2673a48f9.tar.bz2
historical-849d737b98280869b4846c1218e639c2673a48f9.zip
added a downgrade check for bug 25230 (you have been warned)
Diffstat (limited to 'sys-libs/glibc/glibc-2.3.2-r9.ebuild')
-rw-r--r--sys-libs/glibc/glibc-2.3.2-r9.ebuild23
1 files changed, 22 insertions, 1 deletions
diff --git a/sys-libs/glibc/glibc-2.3.2-r9.ebuild b/sys-libs/glibc/glibc-2.3.2-r9.ebuild
index b74b1ef3f008..9d334ad08229 100644
--- a/sys-libs/glibc/glibc-2.3.2-r9.ebuild
+++ b/sys-libs/glibc/glibc-2.3.2-r9.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.2-r9.ebuild,v 1.28 2004/06/28 02:03:43 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.2-r9.ebuild,v 1.29 2004/07/05 01:24:31 genone Exp $
IUSE="nls pic build nptl debug"
@@ -163,6 +163,27 @@ use_nptl() {
}
pkg_setup() {
+ # Check if we are going to downgrade, we don't like that
+ local old_version
+
+ old_version="`best_version glibc`"
+ old_version="${old_version/sys-libs\/glibc-/}"
+
+ if [ `python -c "import portage; print int(portage.vercmp(\"${PV}\",\"$old_version\"))"` -lt 0 ]; then
+ if [ "${FORCE_DOWNGRADE}" ]; then
+ ewarn "downgrading glibc, still not recommended, but we'll do as you wish"
+ return 0
+ else
+ eerror "Dowgrading glibc is not supported and we strongly recommend that"
+ eerror "you don't do it as it WILL break all applications compiled against"
+ eerror "the new version (most likely including python and portage)."
+ eerror "If you are REALLY sure that you want to do it set "
+ eerror " FORCE_DOWNGRADE=1"
+ eerror "when you try it again."
+ die "glibc downgrade"
+ fi
+ fi
+
# We need gcc 3.2 or later ...
if [ "`gcc-major-version`" -ne "3" -o "`gcc-minor-version`" -lt "2" ]
then