summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-02 12:24:02 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-02 12:24:02 -0700
commitc8599e6d0a7cda12e4d1ce8796283fae2a2b4061 (patch)
tree0dbc5f11654a3c9f9651f689a0e4bc4fa69bc54d /bin/ebuild.sh
parent94015a2fe3b2d886b71e874c10bdd2504e54a133 (diff)
downloadportage-c8599e6d0a7cda12e4d1ce8796283fae2a2b4061.tar.gz
portage-c8599e6d0a7cda12e4d1ce8796283fae2a2b4061.tar.bz2
portage-c8599e6d0a7cda12e4d1ce8796283fae2a2b4061.zip
Add a _SANDBOX_COMPAT_LEVEL constant which will be used to enable
a workaround for bug #288863 in the stable branch.
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 73ea8c807..714084f0b 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -5,6 +5,15 @@
PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"
PORTAGE_PYM_PATH="${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}"
+if [[ $PORTAGE_SANDBOX_COMPAT_LEVEL -lt 22 ]] ; then
+ # Ensure that /dev/std* streams have appropriate sandbox permission for
+ # bug #288863. This can be removed after sandbox is fixed and portage
+ # depends on the fixed version (sandbox-2.2 has the fix but it is
+ # currently unstable).
+ export SANDBOX_WRITE="${SANDBOX_WRITE:+${SANDBOX_WRITE}:}/dev/stdout:/dev/stderr"
+ export SANDBOX_READ="${SANDBOX_READ:+${SANDBOX_READ}:}/dev/stdin"
+fi
+
# Don't use sandbox's BASH_ENV for new shells because it does
# 'source /etc/profile' which can interfere with the build
# environment by modifying our PATH.