WIP: More rules
This commit is contained in:
parent
b5456c0fa7
commit
9dc57d2864
@ -349,6 +349,13 @@ error(10, "Commit '{0}' must match package.py value '{1}' for '{2}@={3}'", Vsha,
|
|||||||
pkg_fact(Package, version_has_commit(Version, Psha)),
|
pkg_fact(Package, version_has_commit(Version, Psha)),
|
||||||
Vsha != Psha.
|
Vsha != Psha.
|
||||||
|
|
||||||
|
% need a rule for above, can't select a version that needs a commit if variant matches a version that has a commit
|
||||||
|
:- attr("version", node(ID, Package), VersionA),
|
||||||
|
attr("variant_value", node(ID, Package), "commit", Vsha),
|
||||||
|
pkg_fact(Package, version_has_commit(VersionB, Psha)),
|
||||||
|
Vsha == Psha,
|
||||||
|
VersionA != VersionB.
|
||||||
|
|
||||||
#defined version_satisfies/3.
|
#defined version_satisfies/3.
|
||||||
#defined deprecated_versions_not_allowed/0.
|
#defined deprecated_versions_not_allowed/0.
|
||||||
#defined deprecated_version/2.
|
#defined deprecated_version/2.
|
||||||
|
@ -350,5 +350,10 @@ def test_phil_package_condtional_variants_may_depend_on_commit(mock_packages, co
|
|||||||
|
|
||||||
|
|
||||||
def test_phil_commit_variant_finds_matches_for_commit_versions(mock_packages, config):
|
def test_phil_commit_variant_finds_matches_for_commit_versions(mock_packages, config):
|
||||||
|
"""
|
||||||
|
test conditional dependence on `when='commit=<sha>'`
|
||||||
|
git-ref-commit-dep variant commit-selector depends on a specific commit of git-ref-package
|
||||||
|
that commit is associated with the stable version of git-ref-package
|
||||||
|
"""
|
||||||
spec = spack.concretize.concretize_one(Spec("git-ref-commit-dep+commit-selector"))
|
spec = spack.concretize.concretize_one(Spec("git-ref-commit-dep+commit-selector"))
|
||||||
assert spec.satisfies("^git-ref-package@stable")
|
assert spec.satisfies("^git-ref-package@stable")
|
||||||
|
Loading…
Reference in New Issue
Block a user