summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-30 04:31:03 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-30 04:31:03 +0000
commit6ddb43d4cefac01b12ce9d2655b36180a8932acb (patch)
tree86336838fdd778923bb9e2bdf44482fad6894b8b /bin/ebuild.sh
parent0a7b011b785a0f8f67f770eabf6eae9d4f22707d (diff)
downloadportage-6ddb43d4cefac01b12ce9d2655b36180a8932acb.tar.gz
portage-6ddb43d4cefac01b12ce9d2655b36180a8932acb.tar.bz2
portage-6ddb43d4cefac01b12ce9d2655b36180a8932acb.zip
For bug #180165, make portageq print a "Permission denied" error when appropriate and make has_version die if portageq has an unexpected exit code. (branches/2.1.2 r6885)
svn path=/main/branches/2.1.2.9/; revision=7470
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh18
1 files changed, 13 insertions, 5 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 5b9abd7a6..18c946840 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() {