From abaddf6abefc64b9bc9a5dba40bcb5fb384f0b44 Mon Sep 17 00:00:00 2001 From: Philipp Spilger <philipp.spilger@kip.uni-heidelberg.de> Date: Thu, 22 Feb 2024 22:41:53 +0100 Subject: [PATCH] feat: Fetch specs with correct compiler constraint Change-Id: I2b72fd1abc480deae4ac38ea4bd2be4055f442ad --- lib/yashchiki/fetch.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/yashchiki/fetch.sh b/lib/yashchiki/fetch.sh index 7a4db2df..362dce95 100755 --- a/lib/yashchiki/fetch.sh +++ b/lib/yashchiki/fetch.sh @@ -91,13 +91,9 @@ for package in "${packages_to_fetch[@]}"; do eval "${oldstate}" tmp_err="$(mktemp)" tmpfiles_concretize_err+=("${tmp_err}") - # We need to strip the compiler spec starting with '%' from the spec string - # because the compiler is not yet known. - # Note that this will also delete target information right now! - package_wo_compiler="${package%%%*}" ( set -x; - ( specfile=$(get_specfile_name "${package_wo_compiler}"); - (${MY_SPACK_CMD} spec --fresh -y "${package_wo_compiler}" > "${specfile}") + ( specfile=$(get_specfile_name "${package}"); + (${MY_SPACK_CMD} spec --fresh -y "${package}" > "${specfile}") ) 2>"${tmp_err}" \ || ( echo "CONCRETIZING FAILED" >> "${tmpfiles_concretize_err[0]}" ); ) & @@ -148,8 +144,7 @@ find "${MY_SPACK_FOLDER}/var/spack/repos" -type f -print0 \ # now fetch everything that is needed in order fetch_specfiles=() for package in "${packages_to_fetch[@]}"; do - package_wo_compiler="${package%%%*}" - specfile="$(get_specfile_name "${package_wo_compiler}")" + specfile="$(get_specfile_name "${package}")" if (( $(wc -l <"${specfile}") == 0 )); then echo "${package} failed to concretize!" >&2 exit 1 -- GitLab