Skip to content

Commit

Permalink
Copy --{use,no}-cache from install to bootstrap (spack#11786)
Browse files Browse the repository at this point in the history
  • Loading branch information
obreitwi authored and scheibelp committed Jul 12, 2019
1 parent 76f1ee5 commit d1af7ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 10 additions & 1 deletion lib/spack/spack/cmd/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ def setup_parser(subparser):
'-v', '--verbose', action='store_true', dest='verbose',
help="display verbose build output while installing")

cache_group = subparser.add_mutually_exclusive_group()
cache_group.add_argument(
'--use-cache', action='store_true', dest='use_cache', default=True,
help="check for pre-built Spack packages in mirrors (default)")
cache_group.add_argument(
'--no-cache', action='store_false', dest='use_cache', default=True,
help="do not check for pre-built Spack packages in mirrors")

cd_group = subparser.add_mutually_exclusive_group()
arguments.add_common_arguments(cd_group, ['clean', 'dirty'])

Expand All @@ -37,7 +45,8 @@ def bootstrap(parser, args, **kwargs):
'keep_stage': args.keep_stage,
'install_deps': 'dependencies',
'verbose': args.verbose,
'dirty': args.dirty
'dirty': args.dirty,
'use_cache': args.use_cache
})

# Define requirement dictionary defining general specs which need
Expand Down
3 changes: 2 additions & 1 deletion share/spack/spack-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ function _spack_blame {

function _spack_bootstrap {
compgen -W "-h --help -j --jobs --keep-prefix --keep-stage
-n --no-checksum -v --verbose --clean --dirty" -- "$cur"
-n --no-checksum -v --verbose --use-cache --no-cache
--clean --dirty" -- "$cur"
}

function _spack_build {
Expand Down

0 comments on commit d1af7ae

Please sign in to comment.