patching: do strict version range checking (#13989)

* apply strict constraint checks for patches, otherwise Spack may incorrectly treat a version range constraint as satisfied when mixing x.y and x.y.z versions
* add mixed version checks to version comparison tests
This commit is contained in:
Peter Scheibel
2019-12-04 23:27:08 -07:00
committed by Todd Gamblin
parent 55ee2aecdf
commit e9ee9eaf50
5 changed files with 23 additions and 2 deletions

View File

@@ -0,0 +1 @@
this patch is never applied, it is used to check spec semantics on when the concretizer chooses to include a patch

View File

@@ -13,11 +13,14 @@ class Patch(Package):
url = "http://www.example.com/patch-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
version('1.0.1')
version('1.0.2')
version('2.0', '0123456789abcdef0123456789abcdef')
patch('foo.patch')
patch('bar.patch', when='@2:')
patch('baz.patch')
patch('biz.patch', when='@1.0.1:1.0.2')
def install(self, spec, prefix):
pass