From 931d9641cf9b8f8fa92ef7a816653033f6fcf6c2 Mon Sep 17 00:00:00 2001 From: Eleni Mathioulaki <emathioulaki@athenarc.gr> Date: Fri, 15 Mar 2024 16:13:09 +0200 Subject: [PATCH] fix: check if env is complete before fetching spack fetch --missing fails when there are no missing packages --- install_spack_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_spack_env.sh b/install_spack_env.sh index f0065f98..536696f8 100644 --- a/install_spack_env.sh +++ b/install_spack_env.sh @@ -80,7 +80,7 @@ spack env activate $EBRAINS_SPACK_ENV # fetch all sources spack concretize --fresh --test root -spack fetch --dependencies --missing +spack-python -c "exit(not len(spack.environment.active_environment().uninstalled_specs()))" && spack fetch --dependencies --missing rm $SPACK_ROOT/var/spack/environments/$EBRAINS_SPACK_ENV/spack.lock # install the environment, use 2 jobs to reduce the amount of required RAM -- GitLab