From 3d95c727bbd0261b49c8fa3e09e64a53177335db Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 20 Jun 2007 00:17:17 +0000 Subject: For bug #180165, make has_version dir if portageq has an unexpected exit code. svn path=/main/trunk/; revision=6882 --- bin/ebuild.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'bin/ebuild.sh') 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() { -- cgit v1.2.3-1-g7c22