summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2021-10-14 23:06:41 +0200
committerGitHub <noreply@github.com>2021-10-14 23:06:41 +0200
commiteded8f48dc629a5f3a72acf9c134731f8b89606c (patch)
tree5ebfce798f9a9dfead7bb9444587ebaab8df7627 /var
parentd9d0ceb726b301d68fd649f395fb94134b6f7943 (diff)
downloadspack-eded8f48dc629a5f3a72acf9c134731f8b89606c.tar.gz
spack-eded8f48dc629a5f3a72acf9c134731f8b89606c.tar.bz2
spack-eded8f48dc629a5f3a72acf9c134731f8b89606c.tar.xz
spack-eded8f48dc629a5f3a72acf9c134731f8b89606c.zip
ASP-based solver: add a rule for version uniqueness in virtual packages (#26740)
fixes #26718 A virtual package may or may not have a version, but it never has more than one. Previously we were missing a rule for that.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/hpcviewer/package.py13
-rw-r--r--var/spack/repos/builtin.mock/packages/virtual-with-versions/package.py20
2 files changed, 33 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/hpcviewer/package.py b/var/spack/repos/builtin.mock/packages/hpcviewer/package.py
new file mode 100644
index 0000000000..2015e6a294
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/hpcviewer/package.py
@@ -0,0 +1,13 @@
+# Copyright 2013-2021 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 Hpcviewer(AutotoolsPackage):
+ """Uses version-test-pkg, as a build dependency"""
+ homepage = "http://www.spack.org"
+ url = "http://www.spack.org/downloads/aml-1.0.tar.gz"
+
+ version('2019.02', '0123456789abcdef0123456789abcdef')
+
+ depends_on('java@11:', type=('build', 'run'), when='@2021.0:')
+ depends_on('java@8', type=('build', 'run'), when='@:2020')
diff --git a/var/spack/repos/builtin.mock/packages/virtual-with-versions/package.py b/var/spack/repos/builtin.mock/packages/virtual-with-versions/package.py
new file mode 100644
index 0000000000..9b0e9271da
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/virtual-with-versions/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2021 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 VirtualWithVersions(AutotoolsPackage):
+ """Uses version-test-pkg, as a build dependency"""
+ homepage = "http://www.spack.org"
+ url = "http://www.spack.org/downloads/aml-1.0.tar.gz"
+
+ version('17.0.1', '0123456789abcdef0123456789abcdef')
+ version('16.0.1', '0123456789abcdef0123456789abcdef')
+ version('11.0.1', '0123456789abcdef0123456789abcdef')
+ version('1.8.0', '0123456789abcdef0123456789abcdef')
+
+ provides('java@17', when='@17.0:17.9')
+ provides('java@16', when='@16.0:16.9')
+ provides('java@11', when='@11.0:11.9')
+ provides('java@10', when='@10.0:10.9')
+ provides('java@9', when='@9.0:9.9')
+ provides('java@8', when='@1.8.0:1.8.9')