diff --git a/bin/make_subspack b/bin/make_subspack index b603a05..b5da484 100755 --- a/bin/make_subspack +++ b/bin/make_subspack @@ -12,6 +12,7 @@ get_from_bootstrap() { usage() { echo "usage: make_subspack [options] [-t|-u] path/to/existing/spack /path/to/new/area" echo " options are:" + echo "--without_caches enable buildcache mirrors echo "--with_padding enable directory padding in config" echo "--spack_release xx install spack release xx" echo "--spack_repo url use spack repo url" @@ -32,7 +33,7 @@ parse_args() { verbose=false plain=false - if x=$(getopt --longoptions with_padding,spack_release:,spack_repo:,local_env:,dev_pkgs: --options vtup -- "$@") + if x=$(getopt --longoptions without_caches,with_padding,spack_release:,spack_repo:,local_env:,dev_pkgs: --options vtup -- "$@") then eval set : $x shift @@ -44,6 +45,7 @@ parse_args() { while echo x$1 | grep x- > /dev/null do case "x$1" in + x--without_caches) disable_caches=true; shift ;; x--with_padding) padding=true; shift ;; x--spack_release) spack_release=$2; shift; shift;; x--spack_repo) spack_repo=$2; shift; shift;; @@ -304,7 +306,11 @@ message "Adding backup buildcache $binary_cache_bak" $SPACK_ROOT/bin/spack mirror add --scope site scisoft $binary_cache_bak $SPACK_ROOT/bin/spack buildcache update-index -d $binary_cache_bak $SPACK_ROOT/bin/spack -k buildcache keys --install --trust --force - +if [ "$disable_caches" != "" ] +then + echo "Disabling buildcache mirrors." + mv $SPACK_ROOT/etc/spack/mirrors.yaml $SPACK_ROOT/etc/spack/mirrors.yaml.bak +fi #symlink in environments from upstream cd $SPACK_ROOT/var/spack mkdir environments