Skip to content

Commit

Permalink
Merge pull request #49 from FNALssi/make_subspack_nocache
Browse files Browse the repository at this point in the history
Make disabling buildcache mirrors an option
  • Loading branch information
marcmengel authored Sep 19, 2024
2 parents 611484b + e563ea2 commit b3f91f2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bin/make_subspack
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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;;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b3f91f2

Please # to comment.