From: Zac Medico Date: Wed, 20 Jun 2007 00:17:17 +0000 (-0000) Subject: For bug #180165, make has_version dir if portageq has an unexpected exit code. X-Git-Tag: v2.2_pre1~1218 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3d95c727bbd0261b49c8fa3e09e64a53177335db;p=portage.git For bug #180165, make has_version dir if portageq has an unexpected exit code. svn path=/main/trunk/; revision=6882 --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 164b2a0df..ffe904e9c 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -182,11 +182,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() {