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-build | |
| 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-build')
| -rwxr-xr-x | test-build | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -53,6 +53,7 @@ DRY_RUN=0 # --dry-run: resolve + print order, do not build ASSUME_YES=0 # --yes: skip the confirm prompt (still prints the order) USE_CACHE=1 # --no-cache disables the dep cache for one run KEEP_TARGET=0 # --keep: copy the built target package out to KEEP_DIR +LOCAL_DEPS=0 # --local-deps: also resolve deps from the target's own repo VERSION_ID="current" # "current" | "15.0"; set by --stable TARGET_ARG="" @@ -85,6 +86,9 @@ OPTIONS: --keep Copy the built target package out to a kept/ dir (path is printed), so it can be installed on the host. The build is otherwise throwaway. + --local-deps Also resolve deps from the target's own repo (its grandparent + dir), for packages whose deps are siblings in the same repo and + not on SBo. The configured SBo tree is still searched after. --no-color Disable ANSI color (auto-disabled when stdout is not a TTY). EOF } @@ -99,6 +103,7 @@ parse_args() { --yes) ASSUME_YES=1; shift ;; --no-cache) USE_CACHE=0; shift ;; --keep) KEEP_TARGET=1; shift ;; + --local-deps) LOCAL_DEPS=1; shift ;; --no-color) USE_COLOR=0; shift ;; -*) echo "Unknown option: $1" >&2; usage >&2; exit 2 ;; *) @@ -851,7 +856,7 @@ main() { parse_args "$@" init_color require_config - SBO_TREE_ROOTS=("$ACTIVE_TREE") + SBO_TREE_ROOTS=("$ACTIVE_TREE") # target's repo root prepended below if --local-deps load_overrides # image + cache namespace (skip the image check on a pure dry-run so the order @@ -873,6 +878,13 @@ main() { exit 1 fi + # --local-deps: search the target's own repo (grandparent of <repo>/<cat>/<pkg>) + # before the SBo tree, so deps that are siblings in the same repo resolve. + if [[ $LOCAL_DEPS -eq 1 ]]; then + local repo_root; repo_root="$(dirname "$(dirname "$tdir")")" + SBO_TREE_ROOTS=("$repo_root" "${SBO_TREE_ROOTS[@]}") + fi + run_target "$tdir" print_summary } |
