Skip to content

Commit

Permalink
Optionally ask make_spack for no extra recipe repos
Browse files Browse the repository at this point in the history
  • Loading branch information
greenc-FNAL committed Dec 16, 2024
1 parent 9b079cd commit 33db2f4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 13 deletions.
9 changes: 9 additions & 0 deletions bin/build-spack-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ BRIEF OPTIONS
--debug-tmp
--fermi-spack-tools-root[= ]<repo>
--fermi-spack-tools-version[= ]<version>
--no-auto-recipe-repos
--(no-)?emergency-buildcache
--(no-)?fail-fast
--(no-)?query-packages
Expand Down Expand Up @@ -195,6 +196,11 @@ SPACK CONFIGURATION OPTIONS
Other Spack Configuration
--no-auto-recipe-repos
Do not define a default set of recipe repositories to obtain and
configure (handled by `make_spack`).
--(no-)?emergency-buildcache
Control whether to dump successfully installed binaries to an
Expand Down Expand Up @@ -1217,6 +1223,7 @@ concretizing_cache_specs=()
extra_binaries_write_cache=()
extra_sources_write_cache=()
fail_fast=1
no_auto_recipe_repos=
recipe_repos=()
si_root=https://github.com/FNALssi/fermi-spack-tools.git
si_ver=main
Expand Down Expand Up @@ -1249,6 +1256,7 @@ while (( $# )); do
--emergency-buildcache) want_emergency_buildcache=1;;
--fail-fast) fail_fast=1;;
--help|-h|-\?) usage 2; exit 1;;
--no-auto-recipe-repos) no_auto_recipe_repos=1;;
--no-cache-write-binaries) _set_cache_write_binaries "none";;
--no-cache-write-sources) unset cache_write_sources;;
--no-emergency-buildcache) unset want_emergency_buildcache;;
Expand Down Expand Up @@ -1423,6 +1431,7 @@ make_spack_cmd=(
${spack_root:+--spack_repo "$spack_root"}
--spack_release $spack_ver
--minimal
${no_auto_recipe_repos:+"--no-recipe-repos"}
${upgrade_etc:+"--upgrade-etc"}
${upgrade_extensions:+"--upgrade-extensions"}
${upgrade_recipes:+"--upgrade-recipes"}
Expand Down
31 changes: 18 additions & 13 deletions bin/make_spack
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,22 @@ find_ourselves() {
clone_repos() {
while read ddir branch repo
do
if [ -e "$ddir/.git" ]; then
if [ "$repo" = "$spack_repo" ] ; then
repo_type=spack
elif [[ "${ddir#$dir/}" == etc/* ]]; then
repo_type=etc
elif [[ "${ddir#$dir/var/spack/}" == extensions/* ]]; then
repo_type=extensions
elif [[ "${ddir#$dir/var/spack/}" == repos/* ]] ||
[ -f "$ddir/repo.yaml" ]; then
repo_type=recipes
else
unset repo_type
if [ "$repo" = "$spack_repo" ] ; then
repo_type=spack
elif [[ "${ddir#$dir/}" == etc/* ]]; then
repo_type=etc
elif [[ "${ddir#$dir/var/spack/}" == extensions/* ]]; then
repo_type=extensions
elif [[ "${ddir#$dir/var/spack/}" == repos/* ]] ||
[ -f "$ddir/repo.yaml" ]; then
if $no_recipes; then
continue
fi
repo_type=recipes
else
unset repo_type
fi
if [ -e "$ddir/.git" ]; then
if [ -n "$repo_type" ]; then
eval "upgrade_repo=\$upgrade_$repo_type"
else
Expand Down Expand Up @@ -165,9 +168,10 @@ parse_args() {
repovers=""
verbose=false
depth=1
no_recipes=false

origargs="$*"
if x=$(getopt --longoptions help,depth,with_padding,upgrade,upgrade-etc,upgrade-extensions,upgrade-recipes,upgrade-spack,spack_release:,minimal,no_buildcache,repover,spack_repo:,query-packages,verbose --options mptuv -- "$@")
if x=$(getopt --longoptions help,depth,with_padding,upgrade,upgrade-etc,upgrade-extensions,upgrade-recipes,upgrade-spack,spack_release:,minimal,no-recipe-repos,no_buildcache,repover,spack_repo:,query-packages,verbose --options mptuv -- "$@")
then
eval set : $x
shift
Expand All @@ -188,6 +192,7 @@ parse_args() {
x--query-packages) query_packages=true; shift ;;
x--help) usage; exit;;
x--no_buildcache) use_buildcache=false; shift;;
x--no-recipe-repos) no_recipes=true; shift;;
x--repover) repovers="$repovers $2"; shift; shift;;
x-v|x--verbose) verbose=true; shift;;
x-u) echo "Deprecated option -u ignored"; shift;;
Expand Down

0 comments on commit 33db2f4

Please sign in to comment.