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
This commit is contained in:

committed by
Todd Gamblin

parent
0a56b7cfd6
commit
d00e8394f8
15
var/spack/repos/builtin.mock/packages/bowtie/package.py
Normal file
15
var/spack/repos/builtin.mock/packages/bowtie/package.py
Normal file
@@ -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')
|
@@ -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')
|
||||
|
||||
|
Reference in New Issue
Block a user