summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2010-08-14 00:28:36 +0200
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2010-08-14 00:28:36 +0200
commit1aca7a6adf643afde027778f1acbde7226dcea72 (patch)
treefddc8859a1be3657d6e4e71221c8a2e5ec12d628 /bin/ebuild.sh
parent6ec700e140ac8679907032af18df831677c421c9 (diff)
downloadportage-1aca7a6adf643afde027778f1acbde7226dcea72.tar.gz
portage-1aca7a6adf643afde027778f1acbde7226dcea72.tar.bz2
portage-1aca7a6adf643afde027778f1acbde7226dcea72.zip
Ensure that all Python processes use the same version of Python.
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh22
1 files changed, 8 insertions, 14 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 9af7e3867..6a2eeb1e6 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"
@@ -164,10 +164,8 @@ has_version() {
return $?
fi
- # 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"
+ PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
+ "$PORTAGE_PYTHON" "${PORTAGE_BIN_PATH}/portageq" has_version "${ROOT}" "$1"
local retval=$?
case "${retval}" in
0)
@@ -187,10 +185,8 @@ portageq() {
die "portageq calls are not allowed in the global scope"
fi
- # 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" "$@"
+ PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
+ "$PORTAGE_PYTHON" "${PORTAGE_BIN_PATH}/portageq" "$@"
}
@@ -211,10 +207,8 @@ best_version() {
return $?
fi
- # 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"
+ PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
+ "$PORTAGE_PYTHON" "${PORTAGE_BIN_PATH}/portageq" 'best_version' "${ROOT}" "$1"
local retval=$?
case "${retval}" in
0)
@@ -1734,7 +1728,7 @@ filter_readonly_variables() {
"
fi
- EPYTHON= "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${filtered_vars}" || die "filter-bash-environment.py failed"
+ "$PORTAGE_PYTHON" "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${filtered_vars}" || die "filter-bash-environment.py failed"
}
# @FUNCTION: preprocess_ebuild_env