diff options
Diffstat (limited to 'sbo-batch-test')
| -rwxr-xr-x | sbo-batch-test | 7 |
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 |
