summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-13 12:14:06 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-13 12:14:06 -0700
commit612a8abf9995c593101b8344fda15acd8267c5e3 (patch)
tree41f74d2708d9b86dd12196baaf2975a7721880df /bin/ebuild.sh
parent26744c1e52a05f7bdc9a14926eb15d7cd08cd354 (diff)
downloadportage-612a8abf9995c593101b8344fda15acd8267c5e3.tar.gz
portage-612a8abf9995c593101b8344fda15acd8267c5e3.tar.bz2
portage-612a8abf9995c593101b8344fda15acd8267c5e3.zip
Bug #315615 - Use EbuildIpcDaemon to implement has_version and best_version.
This provides performance benefits and also avoids permissions issues with FEATURES=userpriv.
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 1b1c054f1..73a610b7e 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -159,6 +159,11 @@ has_version() {
die "portageq calls (has_version calls portageq) are not allowed in the global scope"
fi
+ if [[ -n $PORTAGE_IPC_DAEMON ]] ; then
+ "$PORTAGE_BIN_PATH"/ebuild-ipc has_version "$ROOT" "$1" "$USE"
+ 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} \
@@ -201,6 +206,11 @@ best_version() {
die "portageq calls (best_version calls portageq) are not allowed in the global scope"
fi
+ if [[ -n $PORTAGE_IPC_DAEMON ]] ; then
+ "$PORTAGE_BIN_PATH"/ebuild-ipc best_version "$ROOT" "$1" "$USE"
+ 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} \