aboutsummaryrefslogtreecommitdiffstats
path: root/.extras/test-logic.sh
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 /.extras/test-logic.sh
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>
Diffstat (limited to '.extras/test-logic.sh')
-rw-r--r--.extras/test-logic.sh10
1 files changed, 10 insertions, 0 deletions
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 ""