summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-03 20:53:29 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-03 20:53:29 +0000
commit50f7502ca753f70b0dc93b4c3aad998188a98475 (patch)
tree533cce67123751e1f2c2c2fb0186473a4390cd87
parent20266b0053b2d860b16156a545f18d6e75ae7176 (diff)
downloadportage-50f7502ca753f70b0dc93b4c3aad998188a98475.tar.gz
portage-50f7502ca753f70b0dc93b4c3aad998188a98475.tar.bz2
portage-50f7502ca753f70b0dc93b4c3aad998188a98475.zip
Bug #201090 - When portage creates a temp PORTAGE_BIN_PATH, put it
inside PORTAGE_TMPDIR since, unlike /tmp, it can't be mounted with the "noexec" option. svn path=/main/trunk/; revision=8828
-rw-r--r--pym/portage/dbapi/vartree.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index d75029dc6..54b8d135e 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -2407,7 +2407,10 @@ class dblink(object):
base_path_orig = os.path.dirname(settings["PORTAGE_BIN_PATH"])
from tempfile import mkdtemp
import shutil
- base_path_tmp = mkdtemp()
+ # Make the temp directory inside PORTAGE_TMPDIR since, unlike
+ # /tmp, it can't be mounted with the "noexec" option.
+ base_path_tmp = mkdtemp("", "._portage_reinstall_.",
+ settings["PORTAGE_TMPDIR"])
from portage.process import atexit_register
atexit_register(shutil.rmtree, base_path_tmp)
dir_perms = 0755