summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2015-11-27 08:46:18 +0100
committerJustin Lecher <jlec@gentoo.org>2015-12-07 10:11:54 +0100
commitd2fc4ef864ac27839ca653e91c2b535855271e13 (patch)
tree89a1a4145edb974489542c230a9df0bd2e05e565 /eclass
parentvirtualx.eclass: Simplify API into single virtx() (diff)
downloadgentoo-d2fc4ef864ac27839ca653e91c2b535855271e13.tar.gz
gentoo-d2fc4ef864ac27839ca653e91c2b535855271e13.tar.bz2
gentoo-d2fc4ef864ac27839ca653e91c2b535855271e13.zip
virtualx.eclass: Ban deprecated functionality in EAPI > 5
Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/virtualx.eclass17
1 files changed, 16 insertions, 1 deletions
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 7e78205e09c4..9edf5d96e139 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -22,7 +22,7 @@ case "${EAPI:-0}" in
;;
esac
-inherit eutils
+[[ ${EAPI} == [2345] ]] && inherit eutils
# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
# @DESCRIPTION:
@@ -58,6 +58,8 @@ case ${VIRTUALX_REQUIRED} in
RDEPEND=""
;;
optional|tests)
+ [[ ${EAPI} == [2345] ]] \
+ || die 'Values "optional" and "tests" for VIRTUALX_REQUIRED are banned in EAPI > 5'
# deprecated section YAY.
eqawarn "VIRTUALX_REQUIRED=optional and VIRTUALX_REQUIRED=tests are deprecated."
eqawarn "You can drop the variable definition completely from ebuild,"
@@ -89,8 +91,12 @@ esac
virtualmake() {
debug-print-function ${FUNCNAME} "$@"
+ [[ ${EAPI} == [2345] ]] \
+ || die "${FUNCNAME} is unsupported in EAPI > 5, please use virtx"
+
# backcompat for maketype
if [[ -n ${maketype} ]]; then
+ [[ ${EAPI} == [2345] ]] || die "maketype is banned in EAPI > 5"
eqawarn "ebuild is exporting \$maketype=${maketype}"
eqawarn "Ebuild should be migrated to use 'virtx command' instead."
VIRTUALX_COMMAND=${maketype}
@@ -203,6 +209,9 @@ virtx() {
Xmake() {
debug-print-function ${FUNCNAME} "$@"
+ [[ ${EAPI} == [2345] ]] \
+ || die "${FUNCNAME} is unsupported in EAPI > 5, please use 'virtx emake -j1 ....'"
+
eqawarn "you should not execute make directly"
eqawarn "rather execute Xemake -j1 if you have issues with parallel make"
VIRTUALX_COMMAND="emake -j1" virtualmake "$@"
@@ -214,6 +223,9 @@ Xmake() {
Xemake() {
debug-print-function ${FUNCNAME} "$@"
+ [[ ${EAPI} == [2345] ]] \
+ || die "${FUNCNAME} is unsupported in EAPI > 5, please use 'virtx emake ....'"
+
VIRTUALX_COMMAND="emake" virtualmake "$@"
}
@@ -223,6 +235,9 @@ Xemake() {
Xeconf() {
debug-print-function ${FUNCNAME} "$@"
+ [[ ${EAPI} == [2345] ]] \
+ || die "${FUNCNAME} is unsupported in EAPI > 5, please use 'virtx econf ....'"
+
VIRTUALX_COMMAND="econf" virtualmake "$@"
}