aboutsummaryrefslogtreecommitdiffstats
path: root/CLAUDE.md
diff options
context:
space:
mode:
Diffstat (limited to 'CLAUDE.md')
-rw-r--r--CLAUDE.md26
1 files changed, 16 insertions, 10 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index 1254ab1..4630cb4 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -50,7 +50,8 @@ Top-to-bottom layout:
`~/.config/sbo-batch-tester/config`, i.e. `/root/.config/...` since it runs
as root); `config.example` in the repo is the template. The block sets empty
defaults (`SLACKWARE_BASE LOCAL_MIRROR_15 SBO_TREE_ROOTS`) plus
- `CHROOT_LOCATION=/tmp LOG_ROOT VERSION=15.0`, sources the config if present
+ `CHROOT_LOCATION=/tmp LOG_ROOT PKG_CACHE='' VERSION=15.0`, sources the config
+ if present
(NOT an error if missing, so the script stays sourceable by `test-logic.sh`),
then derives `MIRROR_TREE`. `require_config` (called by `validate_env` and
`init_base`) is what hard-fails a real run when the config is absent or has
@@ -98,16 +99,19 @@ so a mid-target abort still unwinds. `ACTIVE_MOUNTS[]` tracks live overlays.
## Status values
-`SUCCESS DOWNLOAD-FAILED MD5-MISMATCH BUILD-FAILED INSTALL-FAILED
-BLOCKED-BY-DEP UNMET-DEP`. `%README%` recorded separately as a reminder flag,
-not a status.
+`SUCCESS CACHED DOWNLOAD-FAILED MD5-MISMATCH BUILD-FAILED INSTALL-FAILED
+BLOCKED-BY-DEP UNMET-DEP`. `CACHED` = a dependency installed from the persistent
+package cache instead of being rebuilt (target is never CACHED). `%README%`
+recorded separately as a reminder flag, not a status.
## What is verified vs not
- **Verified by self-check** (`test-logic.sh` in repo, `bash test-logic.sh`, no
VM needed): topo order, `%README%` recording, unmet-dep, cycle detection, and
BLOCKED-BY-DEP propagation (`depends_on_failed`, including the transitive
- one-hop cascade). The check builds a fake SBo tree and sources the script with
+ one-hop cascade), and the package-cache logic
+ (`cache_decision`/`cache_path`/`cache_store`/`version_of`). The check builds a
+ fake SBo tree and sources the script with
config overridden AFTER sourcing (sourcing re-runs the CONFIG block, which
resets the vars to empty defaults and may source the external config, so test
vars must be set after the `source`). The test runs as a normal user, so
@@ -137,11 +141,13 @@ not a status.
resolved `.info` env, and the installed file list, so the overlay holds
nothing worth retaining. Do not re-add `--keep` without a reason logs cannot
cover.
-- **Package-output cache** (deferred, user wants it next): keep built `.tgz`
- outside the overlay, `installpkg` a cached dep instead of rebuilding. Fixes
- the "shared deps rebuilt per target" cost in category mode. Likely shape: a
- per-run stash in `$RUN_DIR/pkgcache` keyed `prog-version`, reused across
- targets within one run. NOT implemented yet.
+- **Package cache (DONE).** Persistent `$PKG_CACHE` (config var, empty =
+ disabled), SBo-tree layout `<cat>/<prog>/<prog>-<ver>-...txz`, one .txz per
+ prog. Key = prog+version (build/arch/tag ignored). The named target always
+ builds fresh and refreshes the cache; deps install from cache on a version
+ match (status `CACHED`), else build and cache. Cache wiped when `update_base`
+ patches. Pure `cache_decision`/`cache_path`/`cache_store`/`version_of` covered
+ by `test-logic.sh`. Spec: docs/superpowers/specs/2026-06-24-package-cache-design.md.
- **"all" mode**: build every package across all SBo roots. Extension point in
`main` where `targets` is populated. TODO marker in source.
- **queue/list-file mode**: build a named list. Same extension point.