Skip to content

Commit

Permalink
check-reqs.eclass: Make check-reqs_unsatisfied internal
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Sturmlechner <[email protected]>
  • Loading branch information
a17r committed Aug 3, 2021
1 parent ff47640 commit 712446d
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions eclass/check-reqs.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ _check-reqs_memory() {
eend 0
else
eend 1
check-reqs_unsatisfied \
_check-reqs_unsatisfied \
${size} \
"RAM"
fi
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]"
Expand Down

0 comments on commit 712446d

Please sign in to comment.