diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2021-07-19 22:42:45 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2021-08-03 13:13:55 +0200 |
commit | 712446d67d4e360bead6d01af53d4cf19d99cea7 (patch) | |
tree | fb79dce3cb5a456c84b403f59936efb813b2ac5a /eclass | |
parent | check-reqs.eclass: Make check-reqs_start_phase internal (diff) | |
download | gentoo-712446d67d4e360bead6d01af53d4cf19d99cea7.tar.gz gentoo-712446d67d4e360bead6d01af53d4cf19d99cea7.tar.bz2 gentoo-712446d67d4e360bead6d01af53d4cf19d99cea7.zip |
check-reqs.eclass: Make check-reqs_unsatisfied internal
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/check-reqs.eclass | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass index 6159369920f0..39e4bad13633 100644 --- a/eclass/check-reqs.eclass +++ b/eclass/check-reqs.eclass @@ -338,7 +338,7 @@ _check-reqs_memory() { eend 0 else eend 1 - check-reqs_unsatisfied \ + _check-reqs_unsatisfied \ ${size} \ "RAM" fi @@ -380,7 +380,7 @@ _check-reqs_disk() { if [[ $? == 0 && -n ${space_kbi} ]] ; then if [[ ${space_kbi} -lt $(_check-reqs_get_kibibytes ${size}) ]] ; then eend 1 - check-reqs_unsatisfied \ + _check-reqs_unsatisfied \ ${size} \ "disk space at \"${path}\"" else @@ -421,10 +421,22 @@ _check-reqs_start_phase() { # @FUNCTION: check-reqs_unsatisfied # @INTERNAL # @DESCRIPTION: -# Internal function that inform about check result. +# Internal function that informs about check result. # It has different output between pretend and setup phase, # where in pretend phase it is fatal. check-reqs_unsatisfied() { + [[ ${EAPI} == [67] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _check-reqs_unsatisfied "$@" +} + +# @FUNCTION: _check-reqs_unsatisfied +# @INTERNAL +# @DESCRIPTION: +# Internal function that informs about check result. +# It has different output between pretend and setup phase, +# where in pretend phase it is fatal. +_check-reqs_unsatisfied() { debug-print-function ${FUNCNAME} "$@" [[ -z ${2} ]] && die "Usage: ${FUNCNAME} [size] [location]" |