commit: 6867a735c12ee43b0443a0bff660fd5a1dc2ce0c Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Mon Jul 19 20:38:49 2021 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Tue Aug 3 11:13:54 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6867a735
check-reqs.eclass: Make check-reqs_disk internal Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> eclass/check-reqs.eclass | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass index 0a3a8720bfe..d07ebbadb8a 100644 --- a/eclass/check-reqs.eclass +++ b/eclass/check-reqs.eclass @@ -143,19 +143,19 @@ _check-reqs_run() { ${CHECKREQS_MEMORY} [[ -n ${CHECKREQS_DISK_BUILD} ]] && \ - check-reqs_disk \ + _check-reqs_disk \ "${T}" \ "${CHECKREQS_DISK_BUILD}" fi if [[ ${MERGE_TYPE} != buildonly ]]; then [[ -n ${CHECKREQS_DISK_USR} ]] && \ - check-reqs_disk \ + _check-reqs_disk \ "${EROOT%/}/usr" \ "${CHECKREQS_DISK_USR}" [[ -n ${CHECKREQS_DISK_VAR} ]] && \ - check-reqs_disk \ + _check-reqs_disk \ "${EROOT%/}/var" \ "${CHECKREQS_DISK_VAR}" fi @@ -353,6 +353,16 @@ _check-reqs_memory() { # @DESCRIPTION: # Internal function that checks space on the harddrive. check-reqs_disk() { + [[ ${EAPI} == [67] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _check-reqs_disk "$@" +} + +# @FUNCTION: _check-reqs_disk +# @INTERNAL +# @DESCRIPTION: +# Internal function that checks space on the harddrive. +_check-reqs_disk() { debug-print-function ${FUNCNAME} "$@" [[ -z ${2} ]] && die "Usage: ${FUNCNAME} [path] [size]"