diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2023-07-13 13:29:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-13 11:29:17 +0000 |
commit | 522d9e260bac3692dcec104dc1d6a90c5acd2a04 (patch) | |
tree | a286562411a4e796df56f9b4029e496521043e5d /share | |
parent | 3261889e3a93ab942fd1776188c7ad31524574b4 (diff) | |
download | spack-522d9e260bac3692dcec104dc1d6a90c5acd2a04.tar.gz spack-522d9e260bac3692dcec104dc1d6a90c5acd2a04.tar.bz2 spack-522d9e260bac3692dcec104dc1d6a90c5acd2a04.tar.xz spack-522d9e260bac3692dcec104dc1d6a90c5acd2a04.zip |
mirrors: distinguish between source/binary mirror; simplify schema (#34523)
Allow the following formats:
```yaml
mirrors:
name: <url>
```
```yaml
mirrors:
name:
url: s3://xyz
access_pair: [x, y]
```
```yaml
mirrors:
name:
fetch: http://xyz
push:
url: s3://xyz
access_pair: [x, y]
```
And reserve two new properties to indicate the mirror type (e.g.
mirror.spack.io is a source mirror, not a binary cache)
```yaml
mirrors:
spack-public:
source: true
binary: false
url: https://mirror.spack.io
```
Diffstat (limited to 'share')
-rwxr-xr-x | share/spack/spack-completion.bash | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 959e4924f2..e9e28dcfd9 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -1290,7 +1290,7 @@ _spack_mirror() { then SPACK_COMPREPLY="-h --help -n --no-checksum --deprecated" else - SPACK_COMPREPLY="create destroy add remove rm set-url list" + SPACK_COMPREPLY="create destroy add remove rm set-url set list" fi } @@ -1310,7 +1310,7 @@ _spack_mirror_destroy() { _spack_mirror_add() { if $list_options then - SPACK_COMPREPLY="-h --help --scope --s3-access-key-id --s3-access-key-secret --s3-access-token --s3-profile --s3-endpoint-url" + SPACK_COMPREPLY="-h --help --scope --type --s3-access-key-id --s3-access-key-secret --s3-access-token --s3-profile --s3-endpoint-url" else _mirrors fi @@ -1337,7 +1337,16 @@ _spack_mirror_rm() { _spack_mirror_set_url() { if $list_options then - SPACK_COMPREPLY="-h --help --push --scope --s3-access-key-id --s3-access-key-secret --s3-access-token --s3-profile --s3-endpoint-url" + SPACK_COMPREPLY="-h --help --push --fetch --scope --s3-access-key-id --s3-access-key-secret --s3-access-token --s3-profile --s3-endpoint-url" + else + _mirrors + fi +} + +_spack_mirror_set() { + if $list_options + then + SPACK_COMPREPLY="-h --help --push --fetch --type --url --scope --s3-access-key-id --s3-access-key-secret --s3-access-token --s3-profile --s3-endpoint-url" else _mirrors fi |