summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorpsakievich <psakiev@sandia.gov>2022-08-04 14:17:34 -0600
committerGitHub <noreply@github.com>2022-08-04 13:17:34 -0700
commit3b1401f2921d81740c2d17d96a3b25d7ecb4a299 (patch)
treed892a5bfd40eef17a3bd95935827af1434c514f6 /var
parent19a8bb53f0e3c267f0eee7055f8041dff1f567d1 (diff)
downloadspack-3b1401f2921d81740c2d17d96a3b25d7ecb4a299.tar.gz
spack-3b1401f2921d81740c2d17d96a3b25d7ecb4a299.tar.bz2
spack-3b1401f2921d81740c2d17d96a3b25d7ecb4a299.tar.xz
spack-3b1401f2921d81740c2d17d96a3b25d7ecb4a299.zip
Git Ref versions can be paired to defined versions in the spec (#30998)
The current use of git ref's as a version requires a search algorithm to pick the right matching version based on the tags in the git history of the package. This is less than ideal for the use case where users already know the specific version they want the git ref to be associated with. This PR makes a new version syntax [package]@[ref]=[version] to allow the users to specify the exact hash they wish to use.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/depends-on-develop/package.py17
-rw-r--r--var/spack/repos/builtin.mock/packages/develop-branch-version/package.py17
2 files changed, 34 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/depends-on-develop/package.py b/var/spack/repos/builtin.mock/packages/depends-on-develop/package.py
new file mode 100644
index 0000000000..94d0c091d8
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/depends-on-develop/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2022 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)
+
+
+from spack.package import *
+
+
+class DependsOnDevelop(Package):
+ homepage = "example.com"
+ url = "fake.com"
+
+ version("main", branch="main")
+ version("0.0.0", sha256="0123456789abcdef0123456789abcdef")
+
+ depends_on("develop-branch-version@develop")
diff --git a/var/spack/repos/builtin.mock/packages/develop-branch-version/package.py b/var/spack/repos/builtin.mock/packages/develop-branch-version/package.py
new file mode 100644
index 0000000000..2f8c96352e
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/develop-branch-version/package.py
@@ -0,0 +1,17 @@
+# Copyright 2013-2022 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)
+
+from spack.package import *
+
+
+class DevelopBranchVersion(Package):
+ """Dummy package with develop version"""
+
+ homepage = "http://www.openblas.net"
+ url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz"
+ git = "https://github.com/dummy/repo.git"
+
+ version("develop", branch="develop")
+ version("0.2.15", "b1190f3d3471685f17cfd1ec1d252ac9")