summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2022-07-26 17:56:24 +0200
committerGitHub <noreply@github.com>2022-07-26 08:56:24 -0700
commite2056377d0ef1f6eee7e3c55054833ac8b29114f (patch)
treedc6d03dddec6a5891fa55c456439cc9c7c22c177 /lib
parenta552c27f74bd0bc33857b2ee6949a1a925aeae14 (diff)
downloadspack-e2056377d0ef1f6eee7e3c55054833ac8b29114f.tar.gz
spack-e2056377d0ef1f6eee7e3c55054833ac8b29114f.tar.bz2
spack-e2056377d0ef1f6eee7e3c55054833ac8b29114f.tar.xz
spack-e2056377d0ef1f6eee7e3c55054833ac8b29114f.zip
containerize: fix concretization -> concretizer (#31594)
* containerize: fix concretization -> concretizer * fix test
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/containers.rst2
-rw-r--r--lib/spack/spack/container/__init__.py12
-rw-r--r--lib/spack/spack/test/container/images.py2
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/spack/docs/containers.rst b/lib/spack/docs/containers.rst
index 164e404e37..9c6f8a26c9 100644
--- a/lib/spack/docs/containers.rst
+++ b/lib/spack/docs/containers.rst
@@ -59,7 +59,7 @@ other techniques to minimize the size of the final image:
&& echo " specs:" \
&& echo " - gromacs+mpi" \
&& echo " - mpich" \
- && echo " concretizer: together" \
+ && echo " concretizer:" \
&& echo " unify: true" \
&& echo " config:" \
&& echo " install_tree: /opt/software" \
diff --git a/lib/spack/spack/container/__init__.py b/lib/spack/spack/container/__init__.py
index 78155965e2..196a405dc4 100644
--- a/lib/spack/spack/container/__init__.py
+++ b/lib/spack/spack/container/__init__.py
@@ -55,13 +55,13 @@ def validate(configuration_file):
warnings.warn(msg.format(subsection, configuration_file))
env_dict.pop(subsection)
- # Set the default value of the concretization strategy to "together" and
+ # Set the default value of the concretization strategy to unify and
# warn if the user explicitly set another value
- env_dict.setdefault('concretization', 'together')
- if env_dict['concretization'] != 'together':
- msg = ('the "concretization" attribute of the environment is set '
- 'to "{0}" [the advised value is instead "together"]')
- warnings.warn(msg.format(env_dict['concretization']))
+ env_dict.setdefault('concretizer', {'unify': True})
+ if not env_dict['concretizer']['unify'] is True:
+ warnings.warn('"concretizer:unify" is not set to "true", which means the '
+ 'generated image may contain different variants of the same '
+ 'packages. Set to "true" to get a consistent set of packages.')
# Check if the install tree was explicitly set to a custom value and warn
# that it will be overridden
diff --git a/lib/spack/spack/test/container/images.py b/lib/spack/spack/test/container/images.py
index 291ee9a125..0c993921e9 100644
--- a/lib/spack/spack/test/container/images.py
+++ b/lib/spack/spack/test/container/images.py
@@ -31,7 +31,7 @@ def test_package_info(image):
@pytest.mark.parametrize('extra_config,expected_msg', [
({'modules': {'enable': ['tcl']}}, 'the subsection "modules" in'),
- ({'concretization': 'separately'}, 'the "concretization" attribute'),
+ ({'concretizer': {'unify': False}}, '"concretizer:unify" is not set to "true"'),
({'config': {'install_tree': '/some/dir'}},
'the "config:install_tree" attribute has been set'),
({'view': '/some/dir'}, 'the "view" attribute has been set')