summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-10-11 13:01:22 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-10-11 13:01:22 +0000
commit5ff20108a04392e0eb7d7fd7df35a29cc24a0067 (patch)
tree9b53daa88808b26fcbbd8cb7b6797564a7ac5651 /bin/ebuild.sh
parent03a798a9b1aee04698d627f8926ee449d7553de5 (diff)
downloadportage-5ff20108a04392e0eb7d7fd7df35a29cc24a0067.tar.gz
portage-5ff20108a04392e0eb7d7fd7df35a29cc24a0067.tar.bz2
portage-5ff20108a04392e0eb7d7fd7df35a29cc24a0067.zip
Set EPYTHON variable as empty when calling portageq or dohtml to avoid using potentially unsupported version of Python.
svn path=/main/trunk/; revision=14568
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh30
1 files changed, 23 insertions, 7 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index deadbf3eb..1602601aa 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -160,13 +160,16 @@ useq() {
fi
}
+# Return true if given package is installed. Otherwise return false.
+# Takes single depend-type atoms.
has_version() {
if [ "${EBUILD_PHASE}" == "depend" ]; then
die "portageq calls (has_version calls portageq) are not allowed in the global scope"
fi
- # return shell-true/shell-false if exists.
- # Takes single depend-type atoms.
- PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
+
+ # Set EPYTHON variable as empty so that portageq doesn't try
+ # to use potentially unsupported version of Python.
+ EPYTHON= PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
"${PORTAGE_BIN_PATH}"/portageq has_version "${ROOT}" "$1"
local retval=$?
case "${retval}" in
@@ -186,7 +189,10 @@ portageq() {
if [ "${EBUILD_PHASE}" == "depend" ]; then
die "portageq calls are not allowed in the global scope"
fi
- PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
+
+ # Set EPYTHON variable as empty so that portageq doesn't try
+ # to use potentially unsupported version of Python.
+ EPYTHON= PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
"${PORTAGE_BIN_PATH}/portageq" "$@"
}
@@ -196,13 +202,16 @@ portageq() {
# ----------------------------------------------------------------------------
+# Returns the best/most-current match.
+# Takes single depend-type atoms.
best_version() {
if [ "${EBUILD_PHASE}" == "depend" ]; then
die "portageq calls (best_version calls portageq) are not allowed in the global scope"
fi
- # returns the best/most-current match.
- # Takes single depend-type atoms.
- PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
+
+ # Set EPYTHON variable as empty so that portageq doesn't try
+ # to use potentially unsupported version of Python.
+ EPYTHON= PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
"${PORTAGE_BIN_PATH}/portageq" 'best_version' "${ROOT}" "$1"
local retval=$?
case "${retval}" in
@@ -218,6 +227,13 @@ best_version() {
esac
}
+dohtml() {
+ # Set EPYTHON variable as empty so that dohtml doesn't try
+ # to use potentially unsupported version of Python.
+ EPYTHON= PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
+ "${PORTAGE_BIN_PATH}/ebuild-helpers/dohtml" "$@"
+}
+
use_with() {
if [ -z "$1" ]; then
echo "!!! use_with() called without a parameter." >&2