summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2020-11-27 20:53:39 +0100
committerTamara Dahlgren <dahlgren1@llnl.gov>2021-02-17 17:07:17 -0800
commitd7ffdd76f6703bc0f85b8c5239f11ac1f389e4e9 (patch)
tree42549af7696bd6814698a60268e6abdb57752545 /var
parentb326d59e10046f75b65c8fcbeb691faa5ea7a71a (diff)
downloadspack-d7ffdd76f6703bc0f85b8c5239f11ac1f389e4e9.tar.gz
spack-d7ffdd76f6703bc0f85b8c5239f11ac1f389e4e9.tar.bz2
spack-d7ffdd76f6703bc0f85b8c5239f11ac1f389e4e9.tar.xz
spack-d7ffdd76f6703bc0f85b8c5239f11ac1f389e4e9.zip
concretizer: treat target ranges in directives correctly (#19988)
fixes #19981 This commit adds support for target ranges in directives, for instance: conflicts('+foo', when='target=x86_64:,aarch64:') If any target in a spec body is not a known target the following clause will be emitted: node_target_satisfies(Package, TargetConstraint) when traversing the spec and a definition of the clause will then be printed at the end similarly to what is done for package and compiler versions.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/impossible-concretization/package.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/impossible-concretization/package.py b/var/spack/repos/builtin.mock/packages/impossible-concretization/package.py
new file mode 100644
index 0000000000..bb8ad02b49
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/impossible-concretization/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 ImpossibleConcretization(Package):
+ """Package that should be impossible to concretize due to a conflict
+ with target ranges. See Issue 19981.
+ """
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/example-1.0.tar.gz"
+
+ version(1.0, 'foobarbaz')
+
+ conflicts('target=x86_64:')