diff options
author | Michael Kuhn <michael.kuhn@ovgu.de> | 2020-11-18 12:20:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 03:20:56 -0800 |
commit | 20367e472d780d4090c6343a9af2000d01997f8a (patch) | |
tree | cedec400e1068494d1e1a05746a226b4a7ac7aac /share | |
parent | 77b2e578ec47f7713cae965fede1ab6e60aa69c4 (diff) | |
download | spack-20367e472d780d4090c6343a9af2000d01997f8a.tar.gz spack-20367e472d780d4090c6343a9af2000d01997f8a.tar.bz2 spack-20367e472d780d4090c6343a9af2000d01997f8a.tar.xz spack-20367e472d780d4090c6343a9af2000d01997f8a.zip |
cmd: add `spack mark` command (#16662)
This adds a new `mark` command that can be used to mark packages as either
explicitly or implicitly installed. Apart from fixing the package
database after installing a dependency manually, it can be used to
implement upgrade workflows as outlined in #13385.
The following commands demonstrate how the `mark` and `gc` commands can be
used to only keep the current version of a package installed:
```console
$ spack install pkgA
$ spack install pkgB
$ git pull # Imagine new versions for pkgA and/or pkgB are introduced
$ spack mark -i -a
$ spack install pkgA
$ spack install pkgB
$ spack gc
```
If there is no new version for a package, `install` will simply mark it as
explicitly installed and `gc` will not remove it.
Co-authored-by: Greg Becker <becker33@llnl.gov>
Diffstat (limited to 'share')
-rwxr-xr-x | share/spack/spack-completion.bash | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 969a0898fe..bf44039ad9 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -320,7 +320,7 @@ _spack() { then SPACK_COMPREPLY="-h --help -H --all-help --color -C --config-scope -d --debug --timestamp --pdb -e --env -D --env-dir -E --no-env --use-env-repo -k --insecure -l --enable-locks -L --disable-locks -m --mock -p --profile --sorted-profile --lines -v --verbose --stacktrace -V --version --print-shell-vars" else - SPACK_COMPREPLY="activate add arch blame build-env buildcache cd checksum ci clean clone commands compiler compilers concretize config containerize create deactivate debug dependencies dependents deprecate dev-build develop docs edit env extensions external fetch find flake8 gc gpg graph help info install license list load location log-parse maintainers mirror module patch pkg providers pydoc python reindex remove rm repo resource restage setup solve spec stage test test-env tutorial undevelop uninstall unit-test unload url verify versions view" + SPACK_COMPREPLY="activate add arch blame build-env buildcache cd checksum ci clean clone commands compiler compilers concretize config containerize create deactivate debug dependencies dependents deprecate dev-build develop docs edit env extensions external fetch find flake8 gc gpg graph help info install license list load location log-parse maintainers mark mirror module patch pkg providers pydoc python reindex remove rm repo resource restage setup solve spec stage test test-env tutorial undevelop uninstall unit-test unload url verify versions view" fi } @@ -1088,6 +1088,15 @@ _spack_maintainers() { fi } +_spack_mark() { + if $list_options + then + SPACK_COMPREPLY="-h --help -a --all -e --explicit -i --implicit" + else + _installed_packages + fi +} + _spack_mirror() { if $list_options then |