public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH v2 1/5] multilib-minimal.eclass: remove EAPI 5
@ 2022-01-11 22:24 David Seifert
  2022-01-11 22:24 ` [gentoo-dev] [PATCH v2 2/5] multilib-build.eclass: " David Seifert
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
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/multilib-minimal.eclass | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/eclass/multilib-minimal.eclass b/eclass/multilib-minimal.eclass
index 9a1efe2cc46..97c8d618c42 100644
--- a/eclass/multilib-minimal.eclass
+++ b/eclass/multilib-minimal.eclass
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: multilib-minimal.eclass
 # @MAINTAINER:
 # Michał Górny <mgorny@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
 # @PROVIDES: multilib-build
 # @BLURB: wrapper for multilib builds providing convenient multilib_src_* functions
 # @DESCRIPTION:
@@ -23,18 +23,15 @@
 #
 # If you need generic install rules, use multilib_src_install_all function.
 
-
-case ${EAPI} in
-	5|6|7|8) ;;
+case ${EAPI:-0} in
+	6|7|8) ;;
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-
-[[ ${EAPI} == 5 ]] && inherit eutils
 inherit multilib-build
 
-EXPORT_FUNCTIONS src_configure src_compile src_test src_install
-
+if [[ ! ${_MULTILIB_MINIMAL_ECLASS} ]]; then
+_MULTILIB_MINIMAL_ECLASS=1
 
 multilib-minimal_src_configure() {
 	debug-print-function ${FUNCNAME} "$@"
@@ -123,3 +120,7 @@ multilib-minimal_src_install() {
 		einstalldocs
 	fi
 }
+
+fi
+
+EXPORT_FUNCTIONS src_configure src_compile src_test src_install
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-dev] [PATCH v2 2/5] multilib-build.eclass: remove EAPI 5
  2022-01-11 22:24 [gentoo-dev] [PATCH v2 1/5] multilib-minimal.eclass: remove EAPI 5 David Seifert
@ 2022-01-11 22:24 ` David Seifert
  2022-01-11 22:24 ` [gentoo-dev] [PATCH v2 3/5] multibuild.eclass: remove dead userland_BSD David Seifert
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
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/multilib-build.eclass | 44 +++++-------------------------------
 1 file changed, 6 insertions(+), 38 deletions(-)

diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass
index 17cd7da0d18..a4121ad42f1 100644
--- a/eclass/multilib-build.eclass
+++ b/eclass/multilib-build.eclass
@@ -1,4 +1,4 @@
-# Copyright 2013-2021 Gentoo Authors
+# Copyright 2013-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: multilib-build.eclass
@@ -6,7 +6,7 @@
 # Michał Górny <mgorny@gentoo.org>
 # @AUTHOR:
 # Author: Michał Górny <mgorny@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
 # @PROVIDES: multibuild
 # @BLURB: flags and utility functions for building multilib packages
 # @DESCRIPTION:
@@ -18,15 +18,14 @@
 # dependencies shall use the USE dependency string in ${MULTILIB_USEDEP}
 # to properly request multilib enabled.
 
-case ${EAPI} in
-	5|6|7|8) ;;
+case ${EAPI:-0} in
+	6|7|8) ;;
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-if [[ -z ${_MULTILIB_BUILD} ]]; then
-_MULTILIB_BUILD=1
+if [[ -z ${_MULTILIB_BUILD_ECLASS} ]]; then
+_MULTILIB_BUILD_ECLASS=1
 
-[[ ${EAPI} == 5 ]] && inherit eutils
 inherit multibuild multilib
 
 # @ECLASS-VARIABLE: _MULTILIB_FLAGS
@@ -244,23 +243,6 @@ multilib_parallel_foreach_abi() {
 	multibuild_foreach_variant _multilib_multibuild_wrapper "${@}"
 }
 
-# @FUNCTION: multilib_for_best_abi
-# @USAGE: <argv>...
-# @DESCRIPTION:
-# Runs the given command with setup for the 'best' (usually native) ABI.
-multilib_for_best_abi() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	[[ ${EAPI} == 5 ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use multilib_is_native_abi() instead"
-
-	eqawarn "QA warning: multilib_for_best_abi() function is deprecated and should"
-	eqawarn "not be used. The multilib_is_native_abi() check may be used instead."
-
-	local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abi_pairs) )
-
-	multibuild_for_best_variant _multilib_multibuild_wrapper "${@}"
-}
-
 # @FUNCTION: multilib_check_headers
 # @DESCRIPTION:
 # Check whether the header files are consistent between ABIs.
@@ -583,20 +565,6 @@ multilib_is_native_abi() {
 	[[ ${COMPLETE_MULTILIB} == yes || ${ABI} == ${DEFAULT_ABI} ]]
 }
 
-# @FUNCTION: multilib_build_binaries
-# @DESCRIPTION:
-# Deprecated synonym for multilib_is_native_abi
-multilib_build_binaries() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	[[ ${EAPI} == 5 ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use multilib_is_native_abi() instead"
-
-	eqawarn "QA warning: multilib_build_binaries is deprecated. Please use the equivalent"
-	eqawarn "multilib_is_native_abi function instead."
-
-	multilib_is_native_abi "${@}"
-}
-
 # @FUNCTION: multilib_native_use_with
 # @USAGE: <flag> [<opt-name> [<opt-value>]]
 # @DESCRIPTION:
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-dev] [PATCH v2 3/5] multibuild.eclass: remove dead userland_BSD
  2022-01-11 22:24 [gentoo-dev] [PATCH v2 1/5] multilib-minimal.eclass: remove EAPI 5 David Seifert
  2022-01-11 22:24 ` [gentoo-dev] [PATCH v2 2/5] multilib-build.eclass: " David Seifert
@ 2022-01-11 22:24 ` David Seifert
  2022-01-11 22:24 ` [gentoo-dev] [PATCH v2 4/5] multibuild.eclass: inline cp_args David Seifert
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
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 | 35 ++++++++++++-----------------------
 1 file changed, 12 insertions(+), 23 deletions(-)

diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index 37568ebf87c..cbd48b1eeb6 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: multibuild.eclass
@@ -238,33 +238,22 @@ multibuild_merge_root() {
 	local dest=${2}
 
 	local ret
+	local cp_args=()
 
-	if use userland_BSD; then
-		# Most of BSD variants fail to copy broken symlinks, #447370
-		# also, they do not support --version
-
-		tar -C "${src}" -f - -c . \
-			| tar -x -f - -C "${dest}"
-		[[ ${PIPESTATUS[*]} == '0 0' ]]
-		ret=${?}
+	if cp -a --version &>/dev/null; then
+		cp_args+=( -a )
 	else
-		local cp_args=()
-
-		if cp -a --version &>/dev/null; then
-			cp_args+=( -a )
-		else
-			cp_args+=( -P -R -p )
-		fi
-
-		if cp --reflink=auto --version &>/dev/null; then
-			# enable reflinking if possible to make this faster
-			cp_args+=( --reflink=auto )
-		fi
+		cp_args+=( -P -R -p )
+	fi
 
-		cp "${cp_args[@]}" "${src}"/. "${dest}"/
-		ret=${?}
+	if cp --reflink=auto --version &>/dev/null; then
+		# enable reflinking if possible to make this faster
+		cp_args+=( --reflink=auto )
 	fi
 
+	cp "${cp_args[@]}" "${src}"/. "${dest}"/
+	ret=${?}
+
 	if [[ ${ret} -ne 0 ]]; then
 		die "${MULTIBUILD_VARIANT:-(unknown)}: merging image failed."
 	fi
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-dev] [PATCH v2 4/5] multibuild.eclass: inline cp_args
  2022-01-11 22:24 [gentoo-dev] [PATCH v2 1/5] multilib-minimal.eclass: remove EAPI 5 David Seifert
  2022-01-11 22:24 ` [gentoo-dev] [PATCH v2 2/5] multilib-build.eclass: " David Seifert
  2022-01-11 22:24 ` [gentoo-dev] [PATCH v2 3/5] multibuild.eclass: remove dead userland_BSD David Seifert
@ 2022-01-11 22:24 ` David Seifert
  2022-01-11 22:24 ` [gentoo-dev] [PATCH v2 5/5] multibuild.eclass: remove EAPI 4 and 5 David Seifert
  2022-01-12  8:23 ` [gentoo-dev] [PATCH v2 1/5] multilib-minimal.eclass: remove EAPI 5 Ulrich Mueller
  4 siblings, 0 replies; 6+ messages in thread
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 | 36 +++++++-----------------------------
 1 file changed, 7 insertions(+), 29 deletions(-)

diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index cbd48b1eeb6..4699ebc43fb 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -192,15 +192,10 @@ multibuild_copy_sources() {
 
 	einfo "Will copy sources from ${_MULTIBUILD_INITIAL_BUILD_DIR}"
 
-	local cp_args=()
-	if cp --reflink=auto --version &>/dev/null; then
-		# enable reflinking if possible to make this faster
-		cp_args+=( --reflink=auto )
-	fi
-
 	_multibuild_create_source_copy() {
 		einfo "${MULTIBUILD_VARIANT}: copying to ${BUILD_DIR}"
-		cp -p -R "${cp_args[@]}" \
+		# enable reflinking if possible to make this faster
+		cp -p -R --reflink=auto \
 			"${_MULTIBUILD_INITIAL_BUILD_DIR}" "${BUILD_DIR}" || die
 	}
 
@@ -234,31 +229,14 @@ run_in_build_dir() {
 # (the real root). Both directories have to be real, absolute paths
 # (i.e. including ${D}). Source root will be removed.
 multibuild_merge_root() {
+	debug-print-function ${FUNCNAME} "${@}"
+
 	local src=${1}
 	local dest=${2}
 
-	local ret
-	local cp_args=()
-
-	if cp -a --version &>/dev/null; then
-		cp_args+=( -a )
-	else
-		cp_args+=( -P -R -p )
-	fi
-
-	if cp --reflink=auto --version &>/dev/null; then
-		# enable reflinking if possible to make this faster
-		cp_args+=( --reflink=auto )
-	fi
-
-	cp "${cp_args[@]}" "${src}"/. "${dest}"/
-	ret=${?}
-
-	if [[ ${ret} -ne 0 ]]; then
-		die "${MULTIBUILD_VARIANT:-(unknown)}: merging image failed."
-	fi
-
-	rm -rf "${src}"
+	# enable reflinking if possible to make this faster
+	cp -a --reflink=auto "${src}"/. "${dest}"/ || die "${MULTIBUILD_VARIANT:-(unknown)}: merging image failed"
+	rm -rf "${src}" || die
 }
 
 _MULTIBUILD=1
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-dev] [PATCH v2 5/5] multibuild.eclass: remove EAPI 4 and 5
  2022-01-11 22:24 [gentoo-dev] [PATCH v2 1/5] multilib-minimal.eclass: remove EAPI 5 David Seifert
                   ` (2 preceding siblings ...)
  2022-01-11 22:24 ` [gentoo-dev] [PATCH v2 4/5] multibuild.eclass: inline cp_args David Seifert
@ 2022-01-11 22:24 ` David Seifert
  2022-01-12  8:23 ` [gentoo-dev] [PATCH v2 1/5] multilib-minimal.eclass: remove EAPI 5 Ulrich Mueller
  4 siblings, 0 replies; 6+ messages in thread
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	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] [PATCH v2 1/5] multilib-minimal.eclass: remove EAPI 5
  2022-01-11 22:24 [gentoo-dev] [PATCH v2 1/5] multilib-minimal.eclass: remove EAPI 5 David Seifert
                   ` (3 preceding siblings ...)
  2022-01-11 22:24 ` [gentoo-dev] [PATCH v2 5/5] multibuild.eclass: remove EAPI 4 and 5 David Seifert
@ 2022-01-12  8:23 ` Ulrich Mueller
  4 siblings, 0 replies; 6+ messages in thread
From: Ulrich Mueller @ 2022-01-12  8:23 UTC (permalink / raw
  To: David Seifert; +Cc: gentoo-dev

>>>>> On Tue, 11 Jan 2022, David Seifert wrote:

> -case ${EAPI} in
> -	5|6|7|8) ;;
> +case ${EAPI:-0} in

The :- substitution isn't necessary here.
Same for the other eclasses in the patch series.

> +	6|7|8) ;;
>  	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
>  esac


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-01-12  8:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-11 22:24 [gentoo-dev] [PATCH v2 1/5] multilib-minimal.eclass: remove EAPI 5 David Seifert
2022-01-11 22:24 ` [gentoo-dev] [PATCH v2 2/5] multilib-build.eclass: " David Seifert
2022-01-11 22:24 ` [gentoo-dev] [PATCH v2 3/5] multibuild.eclass: remove dead userland_BSD David Seifert
2022-01-11 22:24 ` [gentoo-dev] [PATCH v2 4/5] multibuild.eclass: inline cp_args David Seifert
2022-01-11 22:24 ` [gentoo-dev] [PATCH v2 5/5] multibuild.eclass: remove EAPI 4 and 5 David Seifert
2022-01-12  8:23 ` [gentoo-dev] [PATCH v2 1/5] multilib-minimal.eclass: remove EAPI 5 Ulrich Mueller

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