From 50f7502ca753f70b0dc93b4c3aad998188a98475 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 3 Dec 2007 20:53:29 +0000 Subject: [PATCH] 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 --- pym/portage/dbapi/vartree.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.26.2