Use os.environ["SANDBOX_ON"] = "0" to make portageq exempt from sandbox for
authorZac Medico <zmedico@gentoo.org>
Fri, 28 Mar 2008 11:50:48 +0000 (11:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 28 Mar 2008 11:50:48 +0000 (11:50 -0000)
things like writing metadata cache. Thanks to ferringb for the suggestion.
(trunk r9448)

svn path=/main/branches/2.1.2/; revision=9550

bin/ebuild.sh
bin/portageq

index 23d0b619a5f96b3a66666ebe8f268b2a93e39800..6df1af492aefbb8eb73cdf679fe2bddb6dce58c2 100755 (executable)
@@ -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
index d65abaa8f4dece923d129e244e31e93650d628e9..f0c2e19e2e78566ec2effe64b72a9a9d1c7b6442 100755 (executable)
@@ -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
 #-----------------------------------------------------------------------------