diff options
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-x | bin/ebuild.sh | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 029d46a2f..6ea33964c 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -190,11 +190,19 @@ has_version() { fi # return shell-true/shell-false if exists. # Takes single depend-type atoms. - if "${PORTAGE_BIN_PATH}/portageq" 'has_version' "${ROOT}" "$1"; then - return 0 - else - return 1 - fi + "${PORTAGE_BIN_PATH}"/portageq has_version "${ROOT}" "$1" + local retval=$? + case "${retval}" in + 0) + return 0 + ;; + 1) + return 1 + ;; + *) + die "unexpected portageq exit code: ${retval}" + ;; + esac } portageq() { |