aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinis Danne <rei4dan@gmail.com>2014-01-20 18:29:52 +0200
committerReinis Danne <rei4dan@gmail.com>2014-01-21 21:55:21 +0200
commit4aac5c491b54e91e02cbe4282969b168ab7f2e58 (patch)
tree96ccb5608a9b4dba0528788fbd7f13c3a6c9e451 /eclass/alternatives-2.eclass
parentalternatives-2.eclass: Fix eclass name in comments (diff)
downloadsci-4aac5c491b54e91e02cbe4282969b168ab7f2e58.tar.gz
sci-4aac5c491b54e91e02cbe4282969b168ab7f2e58.tar.bz2
sci-4aac5c491b54e91e02cbe4282969b168ab7f2e58.zip
alternatives-2.eclass: Add EAPI check
Diffstat (limited to 'eclass/alternatives-2.eclass')
-rw-r--r--eclass/alternatives-2.eclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 17cc66d18..f83c47908 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -10,6 +10,17 @@
# If your package provides pkg_postinst or pkg_prerm phases, you need to be
# sure you explicitly run alternatives-2_pkg_{postinst,prerm} where appropriate.
+case "${EAPI:-0}" in
+ 0|1|2|3)
+ die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
+ ;;
+ 4|5)
+ ;;
+ *)
+ die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
+ ;;
+esac
+
ALTERNATIVES_DIR="/etc/env.d/alternatives"
DEPEND=">=app-admin/eselect-1.4-r100"