public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-dev] [PATCH v2 5/5] multibuild.eclass: remove EAPI 4 and 5
  @ 2022-01-11 22:24 99% ` David Seifert
  0 siblings, 0 replies; 1+ results
From: David Seifert @ 2022-01-11 22:24 UTC (permalink / raw
  To: gentoo-dev; +Cc: David Seifert

Signed-off-by: David Seifert <soap@gentoo.org>
---
 eclass/multibuild.eclass | 42 +++++++---------------------------------
 1 file changed, 7 insertions(+), 35 deletions(-)

diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index 4699ebc43fb..039041af694 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -6,25 +6,20 @@
 # Michał Górny <mgorny@gentoo.org>
 # @AUTHOR:
 # Author: Michał Górny <mgorny@gentoo.org>
-# @SUPPORTED_EAPIS: 4 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
 # @BLURB: A generic eclass for building multiple variants of packages.
 # @DESCRIPTION:
 # The multibuild eclass aims to provide a generic framework for building
 # multiple 'variants' of a package (e.g. multilib, Python
 # implementations).
 
-case "${EAPI:-0}" in
-	[0-3])
-		die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
-		;;
-	[4-8])
-		;;
-	*)
-		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
-		;;
+case ${EAPI:-0} in
+	6|7|8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-if [[ ! ${_MULTIBUILD} ]]; then
+if [[ ! ${_MULTIBUILD_ECLASS} ]]; then
+_MULTIBUILD_ECLASS=1
 
 # @ECLASS-VARIABLE: MULTIBUILD_VARIANTS
 # @REQUIRED
@@ -137,25 +132,6 @@ multibuild_foreach_variant() {
 	return ${ret}
 }
 
-# @FUNCTION: multibuild_parallel_foreach_variant
-# @USAGE: [<argv>...]
-# @DESCRIPTION:
-# Run the passed command repeatedly for each of the enabled package
-# variants. This used to run the commands in parallel but now it's
-# just a deprecated alias to multibuild_foreach_variant.
-#
-# The function returns 0 if all commands return 0, or the first non-zero
-# exit status otherwise. However, it performs all the invocations
-# nevertheless. It is preferred to call 'die' inside of the passed
-# function.
-multibuild_parallel_foreach_variant() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	[[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}"
-
-	multibuild_foreach_variant "${@}"
-}
-
 # @FUNCTION: multibuild_for_best_variant
 # @USAGE: [<argv>...]
 # @DESCRIPTION:
@@ -172,10 +148,7 @@ multibuild_for_best_variant() {
 	[[ ${MULTIBUILD_VARIANTS} ]] \
 		|| die "MULTIBUILD_VARIANTS need to be set"
 
-	# bash-4.1 can't handle negative subscripts
-	local MULTIBUILD_VARIANTS=(
-		"${MULTIBUILD_VARIANTS[$(( ${#MULTIBUILD_VARIANTS[@]} - 1 ))]}"
-	)
+	local MULTIBUILD_VARIANTS=( "${MULTIBUILD_VARIANTS[-1]}" )
 	multibuild_foreach_variant "${@}"
 }
 
@@ -239,5 +212,4 @@ multibuild_merge_root() {
 	rm -rf "${src}" || die
 }
 
-_MULTIBUILD=1
 fi
-- 
2.34.1



^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-01-11 22:24     [gentoo-dev] [PATCH v2 1/5] multilib-minimal.eclass: remove EAPI 5 David Seifert
2022-01-11 22:24 99% ` [gentoo-dev] [PATCH v2 5/5] multibuild.eclass: remove EAPI 4 and 5 David Seifert

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