diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2020-10-27 23:37:34 +0100 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2020-11-17 10:04:13 -0800 |
commit | d00e8394f8bf5ccfa90e2ecbc7ca6bb3c57dfd32 (patch) | |
tree | e1014a0d42eb225da5cf498c5e17dedab8e1ab81 /var | |
parent | 0a56b7cfd66e3d2604fb9fb0eaf1fd521604b0d4 (diff) | |
download | spack-d00e8394f8bf5ccfa90e2ecbc7ca6bb3c57dfd32.tar.gz spack-d00e8394f8bf5ccfa90e2ecbc7ca6bb3c57dfd32.tar.bz2 spack-d00e8394f8bf5ccfa90e2ecbc7ca6bb3c57dfd32.tar.xz spack-d00e8394f8bf5ccfa90e2ecbc7ca6bb3c57dfd32.zip |
concretizer: handle conflicts with compiler ranges correctly
As reported, conflicts with compiler ranges were not treated
correctly. This commit adds tests to verify the expected behavior
for the new concretizer.
The new rules to enforce a correct behavior involve:
- Adding a rule to prefer the compiler selected for
the root package, if no other preference is set
- Give a strong negative weight to compiler preferences
expressed in packages.yaml
- Maximize on compiler AND compiler version match
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin.mock/packages/bowtie/package.py | 15 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/akantu/package.py | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/var/spack/repos/builtin.mock/packages/bowtie/package.py b/var/spack/repos/builtin.mock/packages/bowtie/package.py new file mode 100644 index 0000000000..3f8363c2a8 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/bowtie/package.py @@ -0,0 +1,15 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +class Bowtie(Package): + """Mock package to test conflicts on compiler ranges""" + + homepage = "http://www.example.org" + url = "http://bowtie-1.2.2.tar.bz2" + + version('1.3.0', '1c837ecd990bb022d07e7aab32b09847') + version('1.2.2', '1c837ecd990bb022d07e7aab32b09847') + version('1.2.0', '1c837ecd990bb022d07e7aab32b09847') + + conflicts('%gcc@:4.5.0', when='@1.2.2') diff --git a/var/spack/repos/builtin/packages/akantu/package.py b/var/spack/repos/builtin/packages/akantu/package.py index c58225261f..939c14483b 100644 --- a/var/spack/repos/builtin/packages/akantu/package.py +++ b/var/spack/repos/builtin/packages/akantu/package.py @@ -49,7 +49,7 @@ class Akantu(CMakePackage): extends('python', when='+python') - conflicts('gcc@:5.3.99') + conflicts('%gcc@:5.3.99') conflicts('@:3.0.99 external_solvers=petsc') conflicts('@:3.0.99 +python') |