commit:     c63d1aeb1acd26d352fd93ec0ae819c8ace794d0
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  6 13:23:20 2018 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Jan  6 13:35:37 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c63d1aeb

eclass: Drop EAPI 2 & 3 support in virtaulx.eclass

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/virtualx.eclass | 29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)

diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index d66149b70ba..38e629eef4f 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: virtualx.eclass
@@ -11,17 +11,17 @@
 if [[ ! ${_VIRTUAL_X} ]]; then
 
 case "${EAPI:-0}" in
-       0|1)
+       0|1|2|3)
                die "virtualx.eclass: EAPI ${EAPI} is too old."
                ;;
-       2|3|4|5|6)
+       4|5|6)
                ;;
        *)
                die "virtualx.eclass: EAPI ${EAPI} is not supported yet."
                ;;
 esac
 
-[[ ${EAPI} == [2345] ]] && inherit eutils
+[[ ${EAPI} == [45] ]] && inherit eutils
 
 # @ECLASS-VARIABLE: VIRTUALX_REQUIRED
 # @DESCRIPTION:
@@ -57,7 +57,7 @@ case ${VIRTUALX_REQUIRED} in
                RDEPEND=""
                ;;
        optional|tests)
-               [[ ${EAPI} == [2345] ]] \
+               [[ ${EAPI} == [45] ]] \
                        || 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."
@@ -90,12 +90,12 @@ esac
 virtualmake() {
        debug-print-function ${FUNCNAME} "$@"
 
-       [[ ${EAPI} == [2345] ]] \
+       [[ ${EAPI} == [45] ]] \
                || 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"
+               [[ ${EAPI} == [45] ]] || 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}
@@ -205,13 +205,8 @@ virtx() {
        # Do not break on error, but setup $retval, as we need
        # to kill Xvfb
        debug-print "${FUNCNAME}: $@"
-       if has "${EAPI}" 2 3; then
-               "$@"
-               retval=$?
-       else
-               nonfatal "$@"
-               retval=$?
-       fi
+       nonfatal "$@"
+       retval=$?
 
        # Now kill Xvfb
        kill $(cat /tmp/.X${XDISPLAY}-lock)
@@ -229,7 +224,7 @@ virtx() {
 Xmake() {
        debug-print-function ${FUNCNAME} "$@"
 
-       [[ ${EAPI} == [2345] ]] \
+       [[ ${EAPI} == [45] ]] \
                || die "${FUNCNAME} is unsupported in EAPI > 5, please use 
'virtx emake -j1 ....'"
 
        eqawarn "you should not execute make directly"
@@ -243,7 +238,7 @@ Xmake() {
 Xemake() {
        debug-print-function ${FUNCNAME} "$@"
 
-       [[ ${EAPI} == [2345] ]] \
+       [[ ${EAPI} == [45] ]] \
                || die "${FUNCNAME} is unsupported in EAPI > 5, please use 
'virtx emake ....'"
 
        VIRTUALX_COMMAND="emake" virtualmake "$@"
@@ -255,7 +250,7 @@ Xemake() {
 Xeconf() {
        debug-print-function ${FUNCNAME} "$@"
 
-       [[ ${EAPI} == [2345] ]] \
+       [[ ${EAPI} == [45] ]] \
                || die "${FUNCNAME} is unsupported in EAPI > 5, please use 
'virtx econf ....'"
 
        VIRTUALX_COMMAND="econf" virtualmake "$@"

Reply via email to