Better temp directory selection.
- Prefer tempfile.gettempdir(), then LC dirs like /nfs/tmp2
This commit is contained in:
parent
c2d1478a7c
commit
07ef48a036
@ -23,6 +23,7 @@
|
|||||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
##############################################################################
|
##############################################################################
|
||||||
import os
|
import os
|
||||||
|
import tempfile
|
||||||
|
|
||||||
from llnl.util.filesystem import *
|
from llnl.util.filesystem import *
|
||||||
|
|
||||||
@ -92,9 +93,11 @@
|
|||||||
# Use a %u to add a username to the stage paths here, in case this
|
# Use a %u to add a username to the stage paths here, in case this
|
||||||
# is a shared filesystem. Spack will use the first of these paths
|
# is a shared filesystem. Spack will use the first of these paths
|
||||||
# that it can create.
|
# that it can create.
|
||||||
tmp_dirs = ['/nfs/tmp2/%u/spack-stage',
|
tmp_dirs = []
|
||||||
'/var/tmp/%u/spack-stage',
|
_default_tmp = tempfile.gettempdir()
|
||||||
'/tmp/%u/spack-stage']
|
if _default_tmp != os.getcwd():
|
||||||
|
tmp_dirs.append(os.path.join(_default_tmp, 'spack-stage'))
|
||||||
|
tmp_dirs.append('/nfs/tmp2/%u/spack-stage')
|
||||||
|
|
||||||
# Whether spack should allow installation of unsafe versions of
|
# Whether spack should allow installation of unsafe versions of
|
||||||
# software. "Unsafe" versions are ones it doesn't have a checksum
|
# software. "Unsafe" versions are ones it doesn't have a checksum
|
||||||
|
Loading…
Reference in New Issue
Block a user