From be4f69754e104fb753a9c9f9299a3e72821a6946 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 24 Jun 2026 11:38:33 +0200 Subject: Add --init-base mode for first-time base populate New --init-base flag installs the full slackware64-15.0 package set into SLACKWARE_BASE from the mirror, then exits. Runs its own pre-flight checks (root, NFS reachable, base not under the mirror) since the base does not exist yet, refuses to clobber a populated base, and seeds the last-base-update marker so the first build skips a needless re-patch. Replaces the manual installpkg --root loop that validate_env used to print as a hint. Docs (README, CLAUDE.md, HANDOFF) updated to match. Co-Authored-By: Claude Opus 4.8 --- CLAUDE.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'CLAUDE.md') diff --git a/CLAUDE.md b/CLAUDE.md index 8484a50..d6ee7e9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -49,7 +49,12 @@ Top-to-bottom layout: (`ST_STATUS ST_REASON ST_TIME ST_README`), `ACTIVE_MOUNTS[]`. 3. **usage / init_color / parse_args / validate_env** - fail-fast startup checks with copy-pasteable hints. -4. **update_base** - patches local base from mirror's `patches/packages/` when +4. **init_base** - `--init-base` mode only. First-time populate: `installpkg + --root` the full `slackware64/*/*.t?z` set into `SLACKWARE_BASE`, seed the + `last-base-update` marker, exit. Runs its own checks (root, NFS reachable, + not under mirror) since the base does not exist yet; refuses to clobber a + populated base. Wired in `main` before `validate_env`, exits 0. + **update_base** - patches local base from mirror's `patches/packages/` when ChangeLog head differs (reused from reference script). 5. **SBo tree lookup** - `find_slackbuild_dir`, `category_of`, `pkg_key`, `read_requires`. @@ -93,7 +98,8 @@ not a status. list `failed` (collides with `depends_on_failed`'s `local -n failed`), and `ok`/`bad` must `return 0` (`((x++))` returns nonzero when x was 0). - **NOT runnable-tested** (needs the VM): overlay mounts, chroot build flow, - base patching, installpkg. Logic mirrors the reference script. + base patching, `--init-base` populate, installpkg. Logic mirrors the + reference script / the prior manual populate hint. ## Known shortcuts (ponytail: comments in source) -- cgit v1.2.3