summaryrefslogtreecommitdiffstats
path: root/pym/portage.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage.py')
-rw-r--r--pym/portage.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 6582a3738..b23cf0472 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -9233,7 +9233,10 @@ class dblink:
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_exec import atexit_register
atexit_register(shutil.rmtree, base_path_tmp)
dir_perms = 0755