diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-06-20 00:17:17 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-06-20 00:17:17 +0000 |
commit | 3d95c727bbd0261b49c8fa3e09e64a53177335db (patch) | |
tree | e80ad0632022aa9eae7776e76321e63de23e0f64 | |
parent | 13ecf921b8e21c1ce98c6da8a5852ba13acfb280 (diff) | |
download | portage-3d95c727bbd0261b49c8fa3e09e64a53177335db.tar.gz portage-3d95c727bbd0261b49c8fa3e09e64a53177335db.tar.bz2 portage-3d95c727bbd0261b49c8fa3e09e64a53177335db.zip |
For bug #180165, make has_version dir if portageq has an unexpected exit code.
svn path=/main/trunk/; revision=6882
-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 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() { |