diff --git a/lib/yashchiki/install_spack_packages.sh b/lib/yashchiki/install_spack_packages.sh index 8a6b5818733f9a910fc796d0e5d1baa55f058ad2..d0d3b0e58da9d3b9775dd659b9693cd9856b2189 100755 --- a/lib/yashchiki/install_spack_packages.sh +++ b/lib/yashchiki/install_spack_packages.sh @@ -11,6 +11,8 @@ source "${sourcedir}/setup_env_spack.sh" cd "$HOME" +ls -lisa ${SPEC_FOLDER_IN_CONTAINER} + install_from_buildcache "${spack_packages[@]+"${spack_packages[@]}"}" if [ -n "${SPACK_ENVIRONMENT:-}" ]; then @@ -31,6 +33,7 @@ for package in "${spack_packages[@]+"${spack_packages[@]}"}"; do echo "ERROR: Failed to concretize ${package} for install." >&2 exit 1 fi + ls -lisa ${SPEC_FOLDER_IN_CONTAINER} echo "Installing: ${package} (parallelism factor ${SPACK_INSTALL_PARALLELISM})" >&2 for i in `seq 1 ${SPACK_INSTALL_PARALLELISM}`; do diff --git a/lib/yashchiki/update_build_cache.sh b/lib/yashchiki/update_build_cache.sh index a0345e4b643ceee4230b02d8ddb33fa0a98cca64..a6367a41d681731f373f83438c08d5be1fa1eef6 100755 --- a/lib/yashchiki/update_build_cache.sh +++ b/lib/yashchiki/update_build_cache.sh @@ -44,6 +44,9 @@ proot -w / -S ${TARGET_FOLDER} \ --bind="${BUILD_CACHE_OUTSIDE}:${BUILD_CACHE_INSIDE}" \ /opt/spack_install_scripts/update_build_cache_in_container.sh -q || exit 0 +ls -l ${TARGET_FOLDER}/opt/build_cache/default +find ${TARGET_FOLDER}/opt/spack/opt/spack/ + if [ -n "${CACHE_BUILD_TYPE:-}" ]; then if [ ${CACHE_SOURCE_TYPE} != "oci" ]; then echo "Unknown cache type" diff --git a/lib/yashchiki/update_build_cache_in_container.sh b/lib/yashchiki/update_build_cache_in_container.sh index 75875485e832c525a652a13bd23a3213b42295bb..14d721363042559c3ada865649c3ffa3f971dac5 100755 --- a/lib/yashchiki/update_build_cache_in_container.sh +++ b/lib/yashchiki/update_build_cache_in_container.sh @@ -70,11 +70,13 @@ export SPACK_SHELL="bash" get_hashes_in_spack() { # we only return hashes that are actually IN spack, i.e., that reside under /opt/spack/opt/spack spack find --no-groups -Lp | awk '$3 ~ /^\/opt\/spack\/opt\/spack\// { print $1 }' | sort + echo "DEBUG: Found $(spack find --no-groups -Lp | awk '$3 ~ /^\/opt\/spack\/opt\/spack\// { print $1 }' | sort | wc -l) installed hashes" >&2 } # we store all hashes currently installed that are not already in the buildcache get_hashes_to_store() { + echo "DEBUG: Number of new packages to be added to cache: $(comm -13 <(get_hashes_in_buildcache "${base_buildcache}") <(get_hashes_in_spack))" >&2 comm -13 <(get_hashes_in_buildcache "${base_buildcache}") <(get_hashes_in_spack) } @@ -95,6 +97,9 @@ rm_tmpdir() { } trap rm_tmpdir EXIT + +set -x + get_hashes_to_store \ | parallel -r ${args_progress} -j${num_jobs} \ tar Pcfz "${tmpdir_in_destination_folder}/{}.tar.gz" \"\$\(spack location -i /{}\)\"