diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-14 11:30:59 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-14 11:30:59 +0200 |
| commit | 5e9377246b5d932d7d74f86b7c33e556b4cfdcdc (patch) | |
| tree | 0d5ecdaa7d295c82b168dd9e58ba789b2f7bf4ed /.extras/test-logic.sh | |
| parent | e887d1ed0f99fdace6f746699078f6188551ca68 (diff) | |
| download | sbo-slackbuilds-5e9377246b5d932d7d74f86b7c33e556b4cfdcdc.tar.gz sbo-slackbuilds-5e9377246b5d932d7d74f86b7c33e556b4cfdcdc.zip | |
test-build: implement installed_in_base from image package db
Replace the stub with a lazy load of the active image's /var/log/packages:
strip each entry's -<ver>-<arch>-<build> tail to the bare package name and
match REQUIRES tokens against that set, so a dep the full-install image
already provides resolves as met instead of UNMET. Loaded once per run via
docker run --rm; TB_BASE_PKGS/TB_BASE_LOADED are test-seedable to bypass
docker. Add logic-check coverage.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to '.extras/test-logic.sh')
| -rw-r--r-- | .extras/test-logic.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.extras/test-logic.sh b/.extras/test-logic.sh index a05e990..6d54334 100644 --- a/.extras/test-logic.sh +++ b/.extras/test-logic.sh @@ -70,6 +70,20 @@ resolve_target "$T/cat/d" resolve_target "$T/cat/e" [[ ${#CYCLES[@]} -ge 1 ]] && ok "cycle caught" || bad "cycle missed" +# --- installed_in_base ------------------------------------------------------ +# Pre-seed the base pkg set (TB_BASE_LOADED=1 bypasses docker). Names are the +# bare package name; installed_in_base must match a REQUIRES token against it. +TB_BASE_LOADED=1 +TB_BASE_PKGS=([python3]=1 [libfoo]=1) +installed_in_base python3 && ok "base pkg matched" || bad "base pkg not matched" +installed_in_base notthere && bad "absent pkg wrongly matched" || ok "absent pkg not matched" + +# a dep present in the base resolves as met, not UNMET +mk h "python3" +resolve_target "$T/cat/h" +[[ ${#UNMET[@]} -eq 0 ]] && ok "base-provided dep not unmet" || bad "base dep flagged unmet" +TB_BASE_LOADED=0; TB_BASE_PKGS=() + # --- overrides -------------------------------------------------------------- VERSION_ID="current" # reset: left at 15.0 by the version-selection checks above OV=$(mktemp) |
