From 70a80446e46b5f31a7ff77b66e279036b4809ed3 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 24 Jun 2026 17:01:31 +0200 Subject: build_one: dedupe basename, note non-atomic cache install Co-Authored-By: Claude Opus 4.8 --- sbo-batch-test | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sbo-batch-test b/sbo-batch-test index f7ec3e9..1d68844 100755 --- a/sbo-batch-test +++ b/sbo-batch-test @@ -572,19 +572,22 @@ build_one() { if [[ "$is_target" != "1" ]]; then local cached; cached="$(cache_path "$cat" "$prog" "$version")" if [[ -n "$cached" ]]; then + local cb; cb="$(basename "$cached")" local workroot="/sbo-work" mkdir -p "$c$workroot" cp -a "$cached" "$c$workroot/" { echo "===== sbo-batch-test: $prog (from cache) =====" - echo "cached package: $(basename "$cached")" + echo "cached package: $cb" } >> "$logf" - if chroot "$c" /bin/bash -c "installpkg --terse '$workroot/$(basename "$cached")'" >>"$logf" 2>&1; then + if chroot "$c" /bin/bash -c "installpkg --terse '$workroot/$cb'" >>"$logf" 2>&1; then ST_TIME["$key"]=$(( $(date +%s) - start )) ST_STATUS["$key"]="CACHED" return 0 fi # Cache install failed: fall through and build fresh. + # installpkg is not atomic; a partial cache install is fine here because the + # overlay is disposable per target. Rebuild fresh below. echo "cache install failed, building fresh" >> "$logf" fi fi -- cgit v1.2.3