Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 06 Jan 2018 13:35:57
Message-Id: 1515245737.c63d1aeb1acd26d352fd93ec0ae819c8ace794d0.jlec@gentoo
1 commit: c63d1aeb1acd26d352fd93ec0ae819c8ace794d0
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 6 13:23:20 2018 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 6 13:35:37 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c63d1aeb
7
8 eclass: Drop EAPI 2 & 3 support in virtaulx.eclass
9
10 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
11
12 eclass/virtualx.eclass | 29 ++++++++++++-----------------
13 1 file changed, 12 insertions(+), 17 deletions(-)
14
15 diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
16 index d66149b70ba..38e629eef4f 100644
17 --- a/eclass/virtualx.eclass
18 +++ b/eclass/virtualx.eclass
19 @@ -1,4 +1,4 @@
20 -# Copyright 1999-2015 Gentoo Foundation
21 +# Copyright 1999-2018 Gentoo Foundation
22 # Distributed under the terms of the GNU General Public License v2
23
24 # @ECLASS: virtualx.eclass
25 @@ -11,17 +11,17 @@
26 if [[ ! ${_VIRTUAL_X} ]]; then
27
28 case "${EAPI:-0}" in
29 - 0|1)
30 + 0|1|2|3)
31 die "virtualx.eclass: EAPI ${EAPI} is too old."
32 ;;
33 - 2|3|4|5|6)
34 + 4|5|6)
35 ;;
36 *)
37 die "virtualx.eclass: EAPI ${EAPI} is not supported yet."
38 ;;
39 esac
40
41 -[[ ${EAPI} == [2345] ]] && inherit eutils
42 +[[ ${EAPI} == [45] ]] && inherit eutils
43
44 # @ECLASS-VARIABLE: VIRTUALX_REQUIRED
45 # @DESCRIPTION:
46 @@ -57,7 +57,7 @@ case ${VIRTUALX_REQUIRED} in
47 RDEPEND=""
48 ;;
49 optional|tests)
50 - [[ ${EAPI} == [2345] ]] \
51 + [[ ${EAPI} == [45] ]] \
52 || die 'Values "optional" and "tests" for VIRTUALX_REQUIRED are banned in EAPI > 5'
53 # deprecated section YAY.
54 eqawarn "VIRTUALX_REQUIRED=optional and VIRTUALX_REQUIRED=tests are deprecated."
55 @@ -90,12 +90,12 @@ esac
56 virtualmake() {
57 debug-print-function ${FUNCNAME} "$@"
58
59 - [[ ${EAPI} == [2345] ]] \
60 + [[ ${EAPI} == [45] ]] \
61 || die "${FUNCNAME} is unsupported in EAPI > 5, please use virtx"
62
63 # backcompat for maketype
64 if [[ -n ${maketype} ]]; then
65 - [[ ${EAPI} == [2345] ]] || die "maketype is banned in EAPI > 5"
66 + [[ ${EAPI} == [45] ]] || die "maketype is banned in EAPI > 5"
67 eqawarn "ebuild is exporting \$maketype=${maketype}"
68 eqawarn "Ebuild should be migrated to use 'virtx command' instead."
69 VIRTUALX_COMMAND=${maketype}
70 @@ -205,13 +205,8 @@ virtx() {
71 # Do not break on error, but setup $retval, as we need
72 # to kill Xvfb
73 debug-print "${FUNCNAME}: $@"
74 - if has "${EAPI}" 2 3; then
75 - "$@"
76 - retval=$?
77 - else
78 - nonfatal "$@"
79 - retval=$?
80 - fi
81 + nonfatal "$@"
82 + retval=$?
83
84 # Now kill Xvfb
85 kill $(cat /tmp/.X${XDISPLAY}-lock)
86 @@ -229,7 +224,7 @@ virtx() {
87 Xmake() {
88 debug-print-function ${FUNCNAME} "$@"
89
90 - [[ ${EAPI} == [2345] ]] \
91 + [[ ${EAPI} == [45] ]] \
92 || die "${FUNCNAME} is unsupported in EAPI > 5, please use 'virtx emake -j1 ....'"
93
94 eqawarn "you should not execute make directly"
95 @@ -243,7 +238,7 @@ Xmake() {
96 Xemake() {
97 debug-print-function ${FUNCNAME} "$@"
98
99 - [[ ${EAPI} == [2345] ]] \
100 + [[ ${EAPI} == [45] ]] \
101 || die "${FUNCNAME} is unsupported in EAPI > 5, please use 'virtx emake ....'"
102
103 VIRTUALX_COMMAND="emake" virtualmake "$@"
104 @@ -255,7 +250,7 @@ Xemake() {
105 Xeconf() {
106 debug-print-function ${FUNCNAME} "$@"
107
108 - [[ ${EAPI} == [2345] ]] \
109 + [[ ${EAPI} == [45] ]] \
110 || die "${FUNCNAME} is unsupported in EAPI > 5, please use 'virtx econf ....'"
111
112 VIRTUALX_COMMAND="econf" virtualmake "$@"