diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-03-28 11:50:48 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-03-28 11:50:48 +0000 |
commit | 99906eb21a7b93836a0bef58862df128dbaf92b0 (patch) | |
tree | b19550cc0afda9d90988221e3024e6f6a4dc5b86 | |
parent | 9f538c3be23771c00c1be764173a069d652e63c6 (diff) | |
download | portage-99906eb21a7b93836a0bef58862df128dbaf92b0.tar.gz portage-99906eb21a7b93836a0bef58862df128dbaf92b0.tar.bz2 portage-99906eb21a7b93836a0bef58862df128dbaf92b0.zip |
Use os.environ["SANDBOX_ON"] = "0" to make portageq exempt from sandbox for
things like writing metadata cache. Thanks to ferringb for the suggestion.
(trunk r9448)
svn path=/main/branches/2.1.2/; revision=9550
-rwxr-xr-x | bin/ebuild.sh | 2 | ||||
-rwxr-xr-x | bin/portageq | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 23d0b619a..6df1af492 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -7,7 +7,7 @@ PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}" PORTAGE_PYM_PATH="${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}" SANDBOX_PREDICT="${SANDBOX_PREDICT}:/proc/self/maps:/dev/console:/dev/random" -export SANDBOX_PREDICT="${SANDBOX_PREDICT}:${PORTAGE_PYM_PATH}:${PORTAGE_DEPCACHEDIR}" +export SANDBOX_PREDICT export SANDBOX_WRITE="${SANDBOX_WRITE}:/dev/shm:/dev/stdout:/dev/stderr:${PORTAGE_TMPDIR}" export SANDBOX_READ="${SANDBOX_READ}:/:/dev/shm:/dev/stdin:${PORTAGE_TMPDIR}" # Don't use sandbox's BASH_ENV for new shells because it does diff --git a/bin/portageq b/bin/portageq index d65abaa8f..f0c2e19e2 100755 --- a/bin/portageq +++ b/bin/portageq @@ -21,6 +21,10 @@ except KeyboardInterrupt: import os +# This allows portageq to be exempt from sandbox, +# for things like updating metadata cache. +os.environ["SANDBOX_ON"] = "0" + import types import portage_exception #----------------------------------------------------------------------------- |