From d17511a80648ec3c2a66af61deb8ed9893b744e6 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 10 Dec 2021 10:23:14 +0100 Subject: Refactor "spack buildcache" command (#27776) This PR is meant to move code with "business logic" from `spack.cmd.buildcache` to appropriate core modules[^1]. Modifications: - [x] Add `spack.binary_distribution.push` to create a binary package from a spec and push it to a mirror - [x] Add `spack.binary_distribution.install_root_node` to install only the root node of a concrete spec from a buildcache (may check the sha256 sum if it is passed in as input) - [x] Add `spack.binary_distribution.install_single_spec` to install a single concrete spec from a buildcache - [x] Add `spack.binary_distribution.download_single_spec` to download a single concrete spec from a buildcache to a local destination - [x] Add `Spec.from_specfile` that construct a spec given the path of a JSON or YAML spec file - [x] Removed logic from `spack.cmd.buildcache` - [x] Removed calls to `spack.cmd.buildcache` in `spack.bootstrap` - [x] Deprecate `spack buildcache copy` with a message that says it will be removed in v0.19.0 [^1]: The rationale is that commands should be lightweight wrappers of the core API, since that helps with both testing and scripting (easier mocking and no need to invoke `SpackCommand`s in a script). --- share/spack/spack-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 457fc24374..1c883fa4c2 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -511,7 +511,7 @@ _spack_buildcache_create() { _spack_buildcache_install() { if $list_options then - SPACK_COMPREPLY="-h --help -f --force -m --multiple -a --allow-root -u --unsigned -o --otherarch --sha256 --only-root" + SPACK_COMPREPLY="-h --help -f --force -m --multiple -a --allow-root -u --unsigned -o --otherarch" else _all_packages fi -- cgit v1.2.3-70-g09d2