Copy portageq exit code validation from has_version() to best_version().
authorZac Medico <zmedico@gentoo.org>
Sat, 28 Jun 2008 21:58:02 +0000 (21:58 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 28 Jun 2008 21:58:02 +0000 (21:58 -0000)
svn path=/main/trunk/; revision=10836

bin/ebuild.sh

index 2bb6e60ee24ea99100b168439316ce4c1386d639..4e35f7c4db59156cccb1b3f7902fea60ba390e3d 100755 (executable)
@@ -204,6 +204,18 @@ best_version() {
        # Takes single depend-type atoms.
        PYTHONPATH="${PORTAGE_PYM_PATH}:${PYTHONPATH}" \
        "${PORTAGE_BIN_PATH}/portageq" 'best_version' "${ROOT}" "$1"
+       local retval=$?
+       case "${retval}" in
+               0)
+                       return 0
+                       ;;
+               1)
+                       return 1
+                       ;;
+               *)
+                       die "unexpected portageq exit code: ${retval}"
+                       ;;
+       esac
 }
 
 use_with() {