diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-16 11:50:04 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-16 11:50:04 +0200 |
| commit | 3610ad0b72d3bee64c54cb475516a6a20442c07f (patch) | |
| tree | a8c9d2e6b603283e779b89c769f91b353abce123 /test-logic.sh | |
| parent | 766a11b18578e754eebc9d2ca69b198ef01129e1 (diff) | |
| download | sbo-dockerbuild-3610ad0b72d3bee64c54cb475516a6a20442c07f.tar.gz sbo-dockerbuild-3610ad0b72d3bee64c54cb475516a6a20442c07f.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'test-logic.sh')
| -rw-r--r-- | test-logic.sh | 13 |
1 files changed, 13 insertions, 0 deletions
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" |
