aboutsummaryrefslogtreecommitdiffstats
path: root/sbo-batch-test
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-06-24 17:01:31 +0200
committerDanilo M. <danix@danix.xyz>2026-06-24 17:01:31 +0200
commit70a80446e46b5f31a7ff77b66e279036b4809ed3 (patch)
tree1be08a79b3d630c63178cf59fe9a601bade1e15d /sbo-batch-test
parent07af9957bd9d7d273e922323e6469e077b7e7f1d (diff)
downloadsbo-batch-tester-70a80446e46b5f31a7ff77b66e279036b4809ed3.tar.gz
sbo-batch-tester-70a80446e46b5f31a7ff77b66e279036b4809ed3.zip
build_one: dedupe basename, note non-atomic cache install
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'sbo-batch-test')
-rwxr-xr-xsbo-batch-test7
1 files 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