summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2019-06-20 11:09:31 -0700
committerGitHub <noreply@github.com>2019-06-20 11:09:31 -0700
commit284ae9d1ccac953600981b41b13effbf2385806b (patch)
treec0cb1e49a12504f1e4006c8496d20692920cde42 /var
parent4858d8c275b73dfeb2f15c5d30eb894775c9742b (diff)
downloadspack-284ae9d1ccac953600981b41b13effbf2385806b.tar.gz
spack-284ae9d1ccac953600981b41b13effbf2385806b.tar.bz2
spack-284ae9d1ccac953600981b41b13effbf2385806b.tar.xz
spack-284ae9d1ccac953600981b41b13effbf2385806b.zip
Resources: use expanded archive name by default (#11688)
For resources, it is desirable to use the expanded archive name of the resource as the name of the directory when adding it to the root staging area. #11528 established 'spack-src' as the universal directory where source files are placed, which also affected the behavior of resources managed with Stages. This adds a new property ('srcdir') to Stage to remember the name of the expanded source directory, and uses this as the default name when placing a resource directory in the root staging area. This also: * Ensures that downloaded sources are archived using the expanded archive name (otherwise Spack will not be able to determine the original directory name when using a cached archive). * Updates working_dir context manager to guarantee restoration of original working directory when an exception occurs * Adds a "temp_cwd" context manager which creates a temporary directory and sets it as the working directory
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/intel-xed/package.py2
-rw-r--r--var/spack/repos/builtin/packages/warpx/package.py9
2 files changed, 4 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/intel-xed/package.py b/var/spack/repos/builtin/packages/intel-xed/package.py
index 586ea9d7ab..61030326da 100644
--- a/var/spack/repos/builtin/packages/intel-xed/package.py
+++ b/var/spack/repos/builtin/packages/intel-xed/package.py
@@ -41,7 +41,7 @@ class IntelXed(Package):
version(vers, commit=xed_hash)
resource(name='mbuild',
git='https://github.com/intelxed/mbuild.git',
- commit=mbuild_hash, placement='mbuild',
+ commit=mbuild_hash,
when='@{0}'.format(vers))
variant('debug', default=False, description='Enable debug symbols')
diff --git a/var/spack/repos/builtin/packages/warpx/package.py b/var/spack/repos/builtin/packages/warpx/package.py
index 8d3d07d8b9..015c38406b 100644
--- a/var/spack/repos/builtin/packages/warpx/package.py
+++ b/var/spack/repos/builtin/packages/warpx/package.py
@@ -40,19 +40,16 @@ class Warpx(MakefilePackage):
resource(name='amrex',
git='https://github.com/AMReX-Codes/amrex.git',
when='@master',
- tag='master',
- placement='amrex')
+ tag='master')
resource(name='amrex',
git='https://github.com/AMReX-Codes/amrex.git',
when='@dev',
- tag='development',
- placement='amrex')
+ tag='development')
resource(name='picsar',
git='https://bitbucket.org/berkeleylab/picsar.git',
- tag='master',
- placement='picsar')
+ tag='master')
@property
def build_targets(self):