summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2018-11-09 16:41:48 -0800
committerGitHub <noreply@github.com>2018-11-09 16:41:48 -0800
commit6141ae49fd1b418416649399d2dff99400681499 (patch)
tree7b9ae7dc12027dbacde72f0ee0e73f202d20bf13
parent5dc0b657194ee780d8aa7696169c57c8071f91e5 (diff)
downloadspack-6141ae49fd1b418416649399d2dff99400681499.tar.gz
spack-6141ae49fd1b418416649399d2dff99400681499.tar.bz2
spack-6141ae49fd1b418416649399d2dff99400681499.tar.xz
spack-6141ae49fd1b418416649399d2dff99400681499.zip
install: add --use-cache back so that existing tooling does not break (#9797)
- default is still to use the cache, but we've added back the `--use-cache` argument so that scripts that used it are still correct. - `--no-cache` is stil present and is mutually exclusive with `--use-cache`
-rw-r--r--lib/spack/spack/cmd/install.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py
index 26e77b474a..6321063279 100644
--- a/lib/spack/spack/cmd/install.py
+++ b/lib/spack/spack/cmd/install.py
@@ -74,9 +74,15 @@ the dependencies"""
subparser.add_argument(
'--dont-restage', action='store_true',
help="if a partial install is detected, don't delete prior state")
- subparser.add_argument(
- '--no-cache', action='store_false', dest='use_cache',
+
+ cache_group = subparser.add_mutually_exclusive_group()
+ cache_group.add_argument(
+ '--use-cache', action='store_true', dest='use_cache',
help="check for pre-built Spack packages in mirrors")
+ cache_group.add_argument(
+ '--no-cache', action='store_false', dest='use_cache',
+ help="do not check for pre-built Spack packages in mirrors")
+
subparser.add_argument(
'--show-log-on-error', action='store_true',
help="print full build log to stderr if build fails")