summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2002-09-11 17:22:02 +0000
committerMartin Schlemmer <azarah@gentoo.org>2002-09-11 17:22:02 +0000
commit9bc162d04d5cc0eec7d245f4d3059bf77c5ce1e7 (patch)
treed14e3b13791fbf1c547b650d74bc89ac89e1161a /eclass/virtualx.eclass
parentadded sparc and sparc64 to keywords (diff)
downloadhistorical-9bc162d04d5cc0eec7d245f4d3059bf77c5ce1e7.tar.gz
historical-9bc162d04d5cc0eec7d245f4d3059bf77c5ce1e7.tar.bz2
historical-9bc162d04d5cc0eec7d245f4d3059bf77c5ce1e7.zip
disable sandbox when starting xvfb
Diffstat (limited to 'eclass/virtualx.eclass')
-rw-r--r--eclass/virtualx.eclass12
1 files changed, 11 insertions, 1 deletions
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index af67b21d91df..3515095d79e7 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -1,7 +1,7 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author: Martin Schlemmer <azarah@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/eclass/virtualx.eclass,v 1.7 2002/07/12 15:24:36 danarmak Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/virtualx.eclass,v 1.8 2002/09/11 17:22:02 azarah Exp $
# This eclass can be used for packages that needs a working X environment to build
ECLASS=virtualx
INHERITED="$INHERITED $ECLASS"
@@ -9,8 +9,11 @@ newdepend virtual/x11
DESCRIPTION="Based on the $ECLASS eclass"
+[ -z "${SANDBOX_DISABLED}" ] && export SANDBOX_DISABLED="0" || :
+
virtualmake() {
local retval=0
+ local OLD_SANDBOX_DISABLED="${SANDBOX_DISABLED}"
#If $DISPLAY is not set, or xhost cannot connect to an X
#display, then do the Xvfb hack.
@@ -21,6 +24,9 @@ virtualmake() {
# compiling without the X display
einfo "Scanning for a open DISPLAY to start Xvfb..."
+
+ # We really do not want SANDBOX enabled here
+ export SANDBOX_DISABLED="1"
local i=0
XDISPLAY=$(i=0; while [ -f /tmp/.X${i}-lock ] ; do i=$((${i}+1));done; echo ${i})
@@ -42,6 +48,9 @@ virtualmake() {
sleep 2
done
+ # Now enable SANDBOX again if needed.
+ export SANDBOX_DISABLED="${OLD_SANDBOX_DISABLED}"
+
einfo "Starting Xvfb on \$DISPLAY=${XDISPLAY} ..."
export DISPLAY=:${XDISPLAY}
@@ -57,6 +66,7 @@ virtualmake() {
${maketype} $*
retval=$?
fi
+
return $retval
}