From 3610ad0b72d3bee64c54cb475516a6a20442c07f Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 16 Jul 2026 11:50:04 +0200 Subject: test-build: add --local-deps for in-repo deps Resolve deps that are siblings in the target's own repo (not on SBo or official Slackware) by prepending the target's repo root to the dep search roots when --local-deps is passed. The SBo tree is still searched after. Covers packages like huggingface_cli whose deps live in the same maintenance repo. Adds two logic self-checks and updates CLAUDE.md, README, and the test-build-slackbuild skill. Co-Authored-By: Claude Opus 4.8 --- test-logic.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test-logic.sh') diff --git a/test-logic.sh b/test-logic.sh index da50513..563eb30 100644 --- a/test-logic.sh +++ b/test-logic.sh @@ -96,6 +96,19 @@ got="$(cd "$LOCALREPO/mypkg" && resolve_target_dir "mypkg" 2>/dev/null)" resolve_target_dir "nosuchpkg" >/dev/null 2>&1 && bad "missing target should fail" || ok "target: missing fails" rm -rf "$LOCALREPO" +# --- --local-deps: dep resolved from a second (local repo) root ------------- +# 'a' needs 'b'/'c' (already in $T) plus 'loc' which lives only in a separate +# repo root. With just $T it's UNMET; prepend the local root and it resolves. +LR=$(mktemp -d); mkdir -p "$LR/cat/loc"; echo 'REQUIRES=""' > "$LR/cat/loc/loc.info" +mk k "loc" +SBO_TREE_ROOTS=("$T") +resolve_target "$T/cat/k" +[[ ${#UNMET[@]} -eq 1 ]] && ok "local dep unmet without --local-deps" || bad "local dep should be unmet" +SBO_TREE_ROOTS=("$LR" "$T") # what --local-deps prepends +resolve_target "$T/cat/k" +[[ ${#UNMET[@]} -eq 0 ]] && ok "local dep resolved via extra root" || bad "local dep still unmet with extra root" +SBO_TREE_ROOTS=("$T"); rm -rf "$LR" + resolve_target "$T/cat/e" [[ ${#CYCLES[@]} -ge 1 ]] && ok "cycle caught" || bad "cycle missed" -- cgit v1.2.3