From 612a8abf9995c593101b8344fda15acd8267c5e3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 13 Aug 2010 12:14:06 -0700 Subject: Bug #315615 - Use EbuildIpcDaemon to implement has_version and best_version. This provides performance benefits and also avoids permissions issues with FEATURES=userpriv. --- bin/ebuild.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bin/ebuild.sh') 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} \ -- cgit v1.2.3-1-g7c22