summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen de Groot <yngwin@gentoo.org>2010-03-24 14:36:28 +0000
committerBen de Groot <yngwin@gentoo.org>2010-03-24 14:36:28 +0000
commit66f02a561ce98a2c11c2276b53ca1f5f7a21ff62 (patch)
tree3cb4f6b67fb465c114abe7c483550e1b919053d5 /eclass/qt4-build.eclass
parentUse upstream patch instead. (diff)
downloadgentoo-2-66f02a561ce98a2c11c2276b53ca1f5f7a21ff62.tar.gz
gentoo-2-66f02a561ce98a2c11c2276b53ca1f5f7a21ff62.tar.bz2
gentoo-2-66f02a561ce98a2c11c2276b53ca1f5f7a21ff62.zip
[qt4-build.eclass] Prevent users from unintentionally breaking their systems
Diffstat (limited to 'eclass/qt4-build.eclass')
-rw-r--r--eclass/qt4-build.eclass18
1 files changed, 14 insertions, 4 deletions
diff --git a/eclass/qt4-build.eclass b/eclass/qt4-build.eclass
index 1656601bf799..ca4d2de52c58 100644
--- a/eclass/qt4-build.eclass
+++ b/eclass/qt4-build.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.65 2010/02/17 23:32:24 wired Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.66 2010/03/24 14:36:28 yngwin Exp $
# @ECLASS: qt4-build.eclass
# @MAINTAINER:
@@ -69,6 +69,17 @@ S=${WORKDIR}/${MY_P}
qt4-build_pkg_setup() {
[[ ${EAPI} == 2 ]] && use !prefix && EPREFIX=
+ # Protect users by not allowing downgrades between releases
+ # Downgrading revisions within the same release should be allowed
+ if has_version '>'${CATEGORY}/${P}-r9999 ; then
+ if [[ -z $I_KNOW_WHAT_I_AM_DOING ]] ; then
+ eerror "Sanity check to keep you from breaking your system:"
+ eerror " Downgrading Qt is completely unsupported and will break your system!"
+ die "aborting to save your system"
+ else
+ ewarn "Downgrading Qt is completely unsupported and will break your system!"
+ fi
+ fi
PATH="${S}/bin${PATH:+:}${PATH}"
if [[ ${CHOST} != *-darwin* ]]; then
@@ -79,7 +90,8 @@ qt4-build_pkg_setup() {
# platform detection. Note: needs to come before any directories to
# avoid extract failure.
[[ ${CHOST} == *-apple-darwin* ]] && \
- QT4_EXTRACT_DIRECTORIES="src/gui/kernel/qapplication_mac.mm ${QT4_EXTRACT_DIRECTORIES}"
+ QT4_EXTRACT_DIRECTORIES="src/gui/kernel/qapplication_mac.mm
+ ${QT4_EXTRACT_DIRECTORIES}"
fi
# Make sure ebuilds use the required EAPI
@@ -92,8 +104,6 @@ qt4-build_pkg_setup() {
if ! version_is_at_least 4.1 $(gcc-version); then
ewarn "Using a GCC version lower than 4.1 is not supported!"
- echo
- ebeep 3
fi
}