aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-07-14 11:50:06 +0200
committerDanilo M. <danix@danix.xyz>2026-07-14 11:50:06 +0200
commitd839dd447e0365564a8d3c02039e82e5ee16029d (patch)
treeae9176ab67f37a3a166866056466a81e90e77f14
parent5e9377246b5d932d7d74f86b7c33e556b4cfdcdc (diff)
downloadsbo-slackbuilds-d839dd447e0365564a8d3c02039e82e5ee16029d.tar.gz
sbo-slackbuilds-d839dd447e0365564a8d3c02039e82e5ee16029d.zip
test-build: make drop: satisfy a dep at resolution time
Previously drop: only filtered the resolved build order, so an external dep with no dir in the tree (a 15.0-only SBo package like rust-opt) was flagged UNMET before the order filter ran, and drop: could never rescue it. Move the OV_DROP check into _resolve_visit: a dropped token is now skipped entirely (no recurse, no UNMET, no order entry), satisfying 15.0-only deps that the -current base already provides. Still inert on 15.0. Add self-check coverage and clarify overrides.example. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
-rw-r--r--.extras/overrides.example7
-rwxr-xr-x.extras/test-build6
-rw-r--r--.extras/test-logic.sh10
3 files changed, 21 insertions, 2 deletions
diff --git a/.extras/overrides.example b/.extras/overrides.example
index 706d6ea..e9d89e9 100644
--- a/.extras/overrides.example
+++ b/.extras/overrides.example
@@ -2,12 +2,15 @@
# Copy to ~/.config/sbo-testbuild/overrides and edit. Applied only when
# targeting -current (15.0 is the SBo baseline). One rule per line.
#
-# drop: <prog> dep is in 15.0 but already in the -current base
+# drop: <prog> dep is a 15.0-only SBo package whose payload the
+# -current base already ships; skipped at resolution
+# (not built, not flagged UNMET). e.g. rust-opt:
+# 15.0 needs the SBo rust-opt, current has rust in base.
# rename: <old> -> <new> dep was renamed on -current
# fetch: <prog> dep was removed from the -current tree; pull via sbopkg
#
# Start light: add rules only when a real package needs them.
-# drop: rust
+# drop: rust-opt
# rename: python3-foo -> foo
# fetch: somelib
diff --git a/.extras/test-build b/.extras/test-build
index 8057683..90d45ac 100755
--- a/.extras/test-build
+++ b/.extras/test-build
@@ -231,6 +231,12 @@ _resolve_visit() {
continue
fi
tok="$(apply_rename "$tok")"
+ # drop: satisfied by the -current base (e.g. a 15.0-only dep like rust-opt
+ # whose payload ships in current's full-install image). Skip it entirely:
+ # no recurse, no UNMET, no order entry. Inert on 15.0 (overrides are).
+ if [[ "${OV_DROP[$tok]:-}" == "1" ]]; then
+ continue
+ fi
if [[ "${OV_FETCH[$tok]:-}" == "1" ]]; then
FETCH_DEPS["$tok"]=1
continue
diff --git a/.extras/test-logic.sh b/.extras/test-logic.sh
index 6d54334..0616c99 100644
--- a/.extras/test-logic.sh
+++ b/.extras/test-logic.sh
@@ -104,6 +104,16 @@ load_overrides
[[ "$(apply_rename oldname)" == "newname" ]] && ok "apply_rename maps" || bad "apply_rename wrong: [$(apply_rename oldname)]"
[[ "$(apply_rename untouched)" == "untouched" ]] && ok "apply_rename passthrough" || bad "apply_rename mangled untouched"
+# drop satisfies an external (no-dir) dep during resolution: not UNMET, absent
+# from the order. mk k requires a dropme that has no dir in the tree.
+OV_DROP=([extdrop]=1)
+mk k "extdrop"
+resolve_target "$T/cat/k"
+[[ ${#UNMET[@]} -eq 0 ]] && ok "drop satisfies external dep (not unmet)" || bad "dropped external dep still unmet"
+seen=""; for x in "${RESOLVED_ORDER[@]}"; do seen+="$(basename "$x") "; done
+[[ "$seen" != *extdrop* ]] && ok "dropped dep absent from order" || bad "dropped dep in order: [$seen]"
+load_overrides # restore OV_DROP[dropme] for the order-filter test below
+
# drop filters the order (build a fake order of dirs; dropme is removed)
mk dropme ""
mk keepme ""