Adjust PYTHONPATH when calling portageq so that variable
authorZac Medico <zmedico@gentoo.org>
Thu, 29 Nov 2007 07:56:34 +0000 (07:56 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 29 Nov 2007 07:56:34 +0000 (07:56 -0000)
PORTAGE_PYM_PATH works. (trunk r8745)

svn path=/main/branches/2.1.2/; revision=8746

bin/ebuild.sh

index 6bf5d88b7adbf82f6557c92d08b61af157c660fa..a5b89c9d4cb7fb2a844770822c7b07737405264a 100755 (executable)
@@ -149,6 +149,7 @@ has_version() {
        fi
        # return shell-true/shell-false if exists.
        # Takes single depend-type atoms.
+       PYTHONPATH="${PORTAGE_PYM_PATH}:${PYTHONPATH}" \
        "${PORTAGE_BIN_PATH}"/portageq has_version "${ROOT}" "$1"
        local retval=$?
        case "${retval}" in
@@ -168,6 +169,7 @@ portageq() {
        if [ "${EBUILD_PHASE}" == "depend" ]; then
                die "portageq calls are not allowed in the global scope"
        fi
+       PYTHONPATH="${PORTAGE_PYM_PATH}:${PYTHONPATH}" \
        "${PORTAGE_BIN_PATH}/portageq" "$@"
 }
 
@@ -183,6 +185,7 @@ best_version() {
        fi
        # returns the best/most-current match.
        # Takes single depend-type atoms.
+       PYTHONPATH="${PORTAGE_PYM_PATH}:${PYTHONPATH}" \
        "${PORTAGE_BIN_PATH}/portageq" 'best_version' "${ROOT}" "$1"
 }