summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-12-31 19:33:49 +0100
committerMichał Górny <mgorny@gentoo.org>2023-01-07 15:56:44 +0100
commit68b99c1c59935641b354ae51fa6a1762d6316c2d (patch)
treeec6e0bfcef6ec84d8f14f74dfe8b6dbe5c20d440 /eclass
parentout-of-source-utils.eclass: New utility eclass (diff)
downloadgentoo-68b99c1c59935641b354ae51fa6a1762d6316c2d.tar.gz
gentoo-68b99c1c59935641b354ae51fa6a1762d6316c2d.tar.bz2
gentoo-68b99c1c59935641b354ae51fa6a1762d6316c2d.zip
multibuild.eclass: Provide run_in_build_dir from out-of-source-utils
Remove the duplicate definition of run_in_build_dir() function and inherit out-of-source-utils to retain it for compatibility with the existing ebuilds in EAPIs 6, 7 and 8. In future EAPIs, the ebuilds needing it will inherit out-of-source-utils directly. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/multibuild.eclass27
1 files changed, 5 insertions, 22 deletions
diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index 7ae03adbe18c..33edb9312a86 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: multibuild.eclass
@@ -14,7 +14,10 @@
# implementations).
case ${EAPI} in
- 6|7|8) ;;
+ 6|7|8)
+ # backwards compatibility for run_in_build_dir
+ inherit out-of-source-utils
+ ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -175,26 +178,6 @@ multibuild_copy_sources() {
multibuild_foreach_variant _multibuild_create_source_copy
}
-# @FUNCTION: run_in_build_dir
-# @USAGE: <argv>...
-# @DESCRIPTION:
-# Run the given command in the directory pointed by BUILD_DIR.
-run_in_build_dir() {
- debug-print-function ${FUNCNAME} "${@}"
- local ret
-
- [[ ${#} -ne 0 ]] || die "${FUNCNAME}: no command specified."
- [[ ${BUILD_DIR} ]] || die "${FUNCNAME}: BUILD_DIR not set."
-
- mkdir -p "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
- "${@}"
- ret=${?}
- popd >/dev/null || die
-
- return ${ret}
-}
-
# @FUNCTION: multibuild_merge_root
# @USAGE: <src-root> <dest-root>
# @DESCRIPTION: