summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2022-01-12 11:06:11 +0100
committerMichał Górny <mgorny@gentoo.org>2022-01-16 18:40:47 +0100
commit27c3e671005c0c1f2dc747d98aed7d573636bb07 (patch)
tree4c5658142b9298b3aed9607d07d99c5aec456105 /eclass/multibuild.eclass
parentmultibuild.eclass: inline cp_args (diff)
downloadgentoo-27c3e671005c0c1f2dc747d98aed7d573636bb07.tar.gz
gentoo-27c3e671005c0c1f2dc747d98aed7d573636bb07.tar.bz2
gentoo-27c3e671005c0c1f2dc747d98aed7d573636bb07.zip
multibuild.eclass: remove EAPI 4 and 5
Signed-off-by: David Seifert <soap@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/23699 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/multibuild.eclass')
-rw-r--r--eclass/multibuild.eclass42
1 files changed, 7 insertions, 35 deletions
diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index 4699ebc43fb1..a0941ae02ea4 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} 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