public inbox for gentoo-dev-announce@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev-announce] Dropped EAPI 2/3 support in virtualx.eclass
@ 2018-01-06 13:23 Justin Lecher
  0 siblings, 0 replies; only message in thread
From: Justin Lecher @ 2018-01-06 13:23 UTC (permalink / raw
  To: Gentoo Dev, Gentoo Dev Announce mailinglist


[-- Attachment #1.1: Type: text/plain, Size: 3084 bytes --]

Hi all

As there are no consumers [1] of the virtualx.eclass using ancient EAPIs
I dropped support for EAPI=2/3

Best,
Justin

1)
https://qa-reports.gentoo.org/output/eapi-per-eclass/virtualx.eclass/


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 "$@"


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 989 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-06 19:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-06 13:23 [gentoo-dev-announce] Dropped EAPI 2/3 support in virtualx.eclass Justin Lecher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox