diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py index 4a739189fc2..764f1f9168b 100644 --- a/lib/spack/spack/repo.py +++ b/lib/spack/spack/repo.py @@ -240,6 +240,7 @@ def update_package(self, pkg_name): # Add it again under the appropriate tags for tag in getattr(package, 'tags', []): + tag = tag.lower() self._tag_dict[tag].append(package.name) @@ -1002,6 +1003,7 @@ def packages_with_tags(self, *tags): index = self.tag_index for t in tags: + t = t.lower() v &= set(index[t]) return sorted(v) diff --git a/lib/spack/spack/test/cmd/list.py b/lib/spack/spack/test/cmd/list.py index 5d18787bc74..17f5a1b4937 100644 --- a/lib/spack/spack/test/cmd/list.py +++ b/lib/spack/spack/test/cmd/list.py @@ -37,6 +37,14 @@ def test_list_tags(): assert 'cloverleaf3d' in output assert 'hdf5' not in output + output = list('--tags', 'hpc') + assert 'nek5000' in output + assert 'mfem' in output + + output = list('--tags', 'HPC') + assert 'nek5000' in output + assert 'mfem' in output + def test_list_format_name_only(): output = list('--format', 'name_only')