commit: 68b99c1c59935641b354ae51fa6a1762d6316c2d Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Sat Dec 31 18:33:49 2022 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Sat Jan 7 14:56:44 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68b99c1c
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 <AT> gentoo.org> eclass/multibuild.eclass | 27 +++++---------------------- 1 file 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: