summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs/glibc/glibc-2.3.3.20040420.ebuild')
-rw-r--r--sys-libs/glibc/glibc-2.3.3.20040420.ebuild23
1 files changed, 22 insertions, 1 deletions
diff --git a/sys-libs/glibc/glibc-2.3.3.20040420.ebuild b/sys-libs/glibc/glibc-2.3.3.20040420.ebuild
index 68bb2e9bf11e..9ef8254087d9 100644
--- a/sys-libs/glibc/glibc-2.3.3.20040420.ebuild
+++ b/sys-libs/glibc/glibc-2.3.3.20040420.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.3.20040420.ebuild,v 1.8 2004/06/28 02:03:43 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.3.20040420.ebuild,v 1.9 2004/07/05 01:24:31 genone Exp $
IUSE="nls pic build nptl erandom debug"
@@ -164,6 +164,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