-
- Downloads
Added support for querying by tags (#4786)
* Added support to query packages by tags. - The querying commands `spack list`, `spack find` and `spack info` have been modified to support querying by tags. Tests have been added to check that the feature is working correctly under what should be the most frequent use cases. * Refactored Repo class to make insertion of new file caches easier. - Added the class FastPackageChecker. This class is a Mapping from package names to stat info, that gets memoized for faster access. - Extracted the creation of a ProviderIndex to its own factory function. * Added a cache file for tags. - Following what was done for providers, a TagIndex class has been added. This class can serialize and deserialize objects from json. Repo and RepoPath have a new method 'packages_with_tags', that uses the TagIndex to compute a list of package names that have all the tags passed as arguments. On Ubuntu 14.04 the effect if the cache reduces the time for spack list from ~3sec. to ~0.3sec. after the cache has been built. * Fixed colorization of `spack info`
Showing
- lib/spack/spack/cmd/common/arguments.py 13 additions, 1 deletionlib/spack/spack/cmd/common/arguments.py
- lib/spack/spack/cmd/find.py 9 additions, 4 deletionslib/spack/spack/cmd/find.py
- lib/spack/spack/cmd/info.py 18 additions, 8 deletionslib/spack/spack/cmd/info.py
- lib/spack/spack/cmd/list.py 13 additions, 1 deletionlib/spack/spack/cmd/list.py
- lib/spack/spack/file_cache.py 1 addition, 1 deletionlib/spack/spack/file_cache.py
- lib/spack/spack/repository.py 282 additions, 112 deletionslib/spack/spack/repository.py
- lib/spack/spack/test/cmd/find.py 57 additions, 0 deletionslib/spack/spack/test/cmd/find.py
- lib/spack/spack/test/cmd/info.py 52 additions, 0 deletionslib/spack/spack/test/cmd/info.py
- lib/spack/spack/test/cmd/list.py 73 additions, 0 deletionslib/spack/spack/test/cmd/list.py
- var/spack/repos/builtin.mock/packages/mpich/package.py 2 additions, 0 deletionsvar/spack/repos/builtin.mock/packages/mpich/package.py
- var/spack/repos/builtin.mock/packages/mpich2/package.py 2 additions, 0 deletionsvar/spack/repos/builtin.mock/packages/mpich2/package.py
- var/spack/repos/builtin/packages/aspa/package.py 3 additions, 4 deletionsvar/spack/repos/builtin/packages/aspa/package.py
Loading
Please register or sign in to comment