From 2f15e8ee57dd32ab6962fa2b467ccbdb0ecdf1a9 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 11 Jul 2026 11:04:39 +0200 Subject: Add update_personal_trees (rsync-unshadow + pull + shadow) Co-Authored-By: Claude Opus 4.8 --- sbo-batch-test | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/sbo-batch-test b/sbo-batch-test index b33bb65..1ff4e76 100755 --- a/sbo-batch-test +++ b/sbo-batch-test @@ -428,6 +428,34 @@ setup_repo() { exit 0 } +# --update: per-run refresh. rsync the tree (--delete, personal excluded) to +# unshadow + refresh upstream, git-pull each personal subtree, re-shadow. Inline +# and fail-soft: a network hiccup warns but never kills the build session. +update_personal_trees() { + local root="${SBO_TREE_ROOTS[0]}" + [[ -n "$root" ]] || { echo "SBO_TREE_ROOTS[0] is empty; skipping --update." >&2; return; } + + if [[ -n "$SBO_RSYNC_URL" ]]; then + echo "Refreshing tree (rsync, personal subtrees preserved)..." + rsync_tree "$root" || echo "WARN: rsync failed; continuing." >&2 + else + echo "SBO_RSYNC_URL unset; skipping tree rsync (no unshadow)." >&2 + fi + + local dir d + for dir in "${!SBO_PERSONAL_TREES[@]}"; do + d="$root/$dir" + if [[ ! -d "$d/.git" ]]; then + echo "WARN: $d is not a git clone, skipping pull." >&2 + continue + fi + echo "Pulling $dir..." + git -C "$d" pull || echo "WARN: git pull failed in $dir; continuing." >&2 + done + + shadow_scan "$root" +} + # ============================================================================= # Package cache. Persistent, on-disk store of built packages so unchanged deps # are installed from cache instead of rebuilt. Layout mirrors the SBo tree: -- cgit v1.2.3