Gentoo Archives: gentoo-dev-announce

From: Justin Lecher <jlec@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>, Gentoo Dev Announce mailinglist <gentoo-dev-announce@l.g.o>
Subject: [gentoo-dev-announce] Dropped EAPI 2/3 support in virtualx.eclass
Date: Sat, 06 Jan 2018 19:07:34
Message-Id: 0852213c-8a7c-21e7-e0e0-8af8801d4370@gentoo.org
1 Hi all
2
3 As there are no consumers [1] of the virtualx.eclass using ancient EAPIs
4 I dropped support for EAPI=2/3
5
6 Best,
7 Justin
8
9 1)
10 https://qa-reports.gentoo.org/output/eapi-per-eclass/virtualx.eclass/
11
12
13 diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
14 index d66149b70ba..38e629eef4f 100644
15 --- a/eclass/virtualx.eclass
16 +++ b/eclass/virtualx.eclass
17 @@ -1,4 +1,4 @@
18 -# Copyright 1999-2015 Gentoo Foundation
19 +# Copyright 1999-2018 Gentoo Foundation
20 # Distributed under the terms of the GNU General Public License v2
21
22 # @ECLASS: virtualx.eclass
23 @@ -11,17 +11,17 @@
24 if [[ ! ${_VIRTUAL_X} ]]; then
25
26 case "${EAPI:-0}" in
27 - 0|1)
28 + 0|1|2|3)
29 die "virtualx.eclass: EAPI ${EAPI} is too old."
30 ;;
31 - 2|3|4|5|6)
32 + 4|5|6)
33 ;;
34 *)
35 die "virtualx.eclass: EAPI ${EAPI} is not supported yet."
36 ;;
37 esac
38
39 -[[ ${EAPI} == [2345] ]] && inherit eutils
40 +[[ ${EAPI} == [45] ]] && inherit eutils
41
42 # @ECLASS-VARIABLE: VIRTUALX_REQUIRED
43 # @DESCRIPTION:
44 @@ -57,7 +57,7 @@ case ${VIRTUALX_REQUIRED} in
45 RDEPEND=""
46 ;;
47 optional|tests)
48 - [[ ${EAPI} == [2345] ]] \
49 + [[ ${EAPI} == [45] ]] \
50 || die 'Values "optional" and "tests" for VIRTUALX_REQUIRED are
51 banned in EAPI > 5'
52 # deprecated section YAY.
53 eqawarn "VIRTUALX_REQUIRED=optional and VIRTUALX_REQUIRED=tests are
54 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
93 emake -j1 ....'"
94
95 eqawarn "you should not execute make directly"
96 @@ -243,7 +238,7 @@ Xmake() {
97 Xemake() {
98 debug-print-function ${FUNCNAME} "$@"
99
100 - [[ ${EAPI} == [2345] ]] \
101 + [[ ${EAPI} == [45] ]] \
102 || die "${FUNCNAME} is unsupported in EAPI > 5, please use 'virtx
103 emake ....'"
104
105 VIRTUALX_COMMAND="emake" virtualmake "$@"
106 @@ -255,7 +250,7 @@ Xemake() {
107 Xeconf() {
108 debug-print-function ${FUNCNAME} "$@"
109
110 - [[ ${EAPI} == [2345] ]] \
111 + [[ ${EAPI} == [45] ]] \
112 || die "${FUNCNAME} is unsupported in EAPI > 5, please use 'virtx
113 econf ....'"
114
115 VIRTUALX_COMMAND="econf" virtualmake "$@"

Attachments

File name MIME type
signature.asc application/pgp-signature