diff options
Diffstat (limited to 'lib/spack/spack/spec.py')
-rw-r--r-- | lib/spack/spack/spec.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 9a13a7db46..e886108df1 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -622,6 +622,11 @@ class DependencySpec(object): def copy(self): return DependencySpec(self.parent, self.spec, self.deptypes) + def add_type(self, type): + self.deptypes = dp.canonical_deptype( + self.deptypes + dp.canonical_deptype(type) + ) + def _cmp_key(self): return (self.parent.name if self.parent else None, self.spec.name if self.spec else None, |