summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-07-08 08:41:58 +0200
committerMichał Górny <mgorny@gentoo.org>2022-08-02 06:03:40 +0200
commit3020036e18b7408ea7f01ecac4eb09972466aa3a (patch)
tree47fa7867729cfb7c57e493bd518052a1abb91b46 /eclass/virtualx.eclass
parentvirtualx.eclass: Remove unused XHOST (diff)
downloadgentoo-3020036e18b7408ea7f01ecac4eb09972466aa3a.tar.gz
gentoo-3020036e18b7408ea7f01ecac4eb09972466aa3a.tar.bz2
gentoo-3020036e18b7408ea7f01ecac4eb09972466aa3a.zip
virtualx.eclass: Inline XVFB
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/virtualx.eclass')
-rw-r--r--eclass/virtualx.eclass15
1 files changed, 7 insertions, 8 deletions
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 05b89e814a42..d1c05e20b246 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -108,9 +108,8 @@ virtx() {
local i=0
local retval=0
local OLD_SANDBOX_ON="${SANDBOX_ON}"
- local XVFB XDISPLAY
+ local XDISPLAY
local xvfbargs=( -screen 0 1280x1024x24 +extension RANDR )
- XVFB=$(type -p Xvfb) || die
debug-print "${FUNCNAME}: running Xvfb hack"
export XAUTHORITY=
@@ -133,24 +132,24 @@ virtx() {
# We really do not want SANDBOX enabled here
export SANDBOX_ON="0"
- debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs[*]}"
- ${XVFB} :${XDISPLAY} "${xvfbargs[@]}" &>/dev/null &
+ debug-print "${FUNCNAME}: Xvfb :${XDISPLAY} ${xvfbargs[*]}"
+ Xvfb :${XDISPLAY} "${xvfbargs[@]}" &>/dev/null &
sleep 2
local start=${XDISPLAY}
while [[ ! -f /tmp/.X${XDISPLAY}-lock ]]; do
# Stop trying after 15 tries
if ((XDISPLAY - start > 15)) ; then
- eerror "'${XVFB} :${XDISPLAY} ${xvfbargs[*]}' returns:"
+ eerror "'Xvfb :${XDISPLAY} ${xvfbargs[*]}' returns:"
echo
- ${XVFB} :${XDISPLAY} "${xvfbargs[@]}"
+ Xvfb :${XDISPLAY} "${xvfbargs[@]}"
echo
eerror "If possible, correct the above error and try your emerge again."
die "Unable to start Xvfb"
fi
((XDISPLAY++))
- debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs[*]}"
- ${XVFB} :${XDISPLAY} "${xvfbargs[@]}" &>/dev/null &
+ debug-print "${FUNCNAME}: Xvfb :${XDISPLAY} ${xvfbargs[*]}"
+ Xvfb :${XDISPLAY} "${xvfbargs[@]}" &>/dev/null &
sleep 2
done