summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2023-05-05 19:54:26 +0200
committerGitHub <noreply@github.com>2023-05-05 19:54:26 +0200
commit9ef062fcca4d2fd38b496b2c4e2c8a7e6e97de15 (patch)
tree20735da170a8bf9af48afe8804b0a172932ea7e3 /share
parentddea33bdc0a5cd14ecec700d552455a2ec7ca4de (diff)
downloadspack-9ef062fcca4d2fd38b496b2c4e2c8a7e6e97de15.tar.gz
spack-9ef062fcca4d2fd38b496b2c4e2c8a7e6e97de15.tar.bz2
spack-9ef062fcca4d2fd38b496b2c4e2c8a7e6e97de15.tar.xz
spack-9ef062fcca4d2fd38b496b2c4e2c8a7e6e97de15.zip
Add spack buildcache push (alias to buildcache create) (#34861)
`spack buildcache create` is a misnomer cause it's the only way to push to an existing buildcache (and it in fact calls binary_distribution.push). Also we have `spack buildcache update-index` but for create the flag is `--rebuild-index`, which is confusing (and also... why "rebuild" something if the command is "create" in the first place, that implies it wasn't there to begin with). So, after this PR, you can use either ``` spack buildcache create --rebuild-index ``` or ``` spack buildcache push --update-index ``` Also, alias `spack buildcache rebuild-index` to `spack buildcache update-index`.
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/spack-completion.bash22
1 files changed, 20 insertions, 2 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index f79b13287a..320e6fab57 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -491,14 +491,23 @@ _spack_buildcache() {
then
SPACK_COMPREPLY="-h --help"
else
- SPACK_COMPREPLY="create install list keys preview check download get-buildcache-name save-specfile sync update-index"
+ SPACK_COMPREPLY="push create install list keys preview check download get-buildcache-name save-specfile sync update-index rebuild-index"
+ fi
+}
+
+_spack_buildcache_push() {
+ if $list_options
+ then
+ SPACK_COMPREPLY="-h --help -r --rel -f --force -u --unsigned -a --allow-root -k --key -d --directory -m --mirror-name --mirror-url --update-index --rebuild-index --spec-file --only"
+ else
+ _mirrors
fi
}
_spack_buildcache_create() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -r --rel -f --force -u --unsigned -a --allow-root -k --key -d --directory -m --mirror-name --mirror-url --rebuild-index --spec-file --only"
+ SPACK_COMPREPLY="-h --help -r --rel -f --force -u --unsigned -a --allow-root -k --key -d --directory -m --mirror-name --mirror-url --update-index --rebuild-index --spec-file --only"
else
_mirrors
fi
@@ -569,6 +578,15 @@ _spack_buildcache_update_index() {
fi
}
+_spack_buildcache_rebuild_index() {
+ if $list_options
+ then
+ SPACK_COMPREPLY="-h --help -d --directory -m --mirror-name --mirror-url -k --keys"
+ else
+ _mirrors
+ fi
+}
+
_spack_cd() {
if $list_options
then