docs: document incremental builds and the session design
README: the build-session workflow (auto-recording, --resume, 'pkh deb list', --keep, prune retention) under a new section. plans/: the design spec with the decisions taken along the way (opt-in resume, --keep for the iteration loop, /var/tmp/pkh/ sessions, Ctrl+C keeping the session) and the implementation notes recording the as-built deviations.
This commit is contained in:
@@ -111,6 +111,28 @@ pkh put --ppa user/hello_xxx
|
||||
git push xxx user-fork
|
||||
```
|
||||
|
||||
### Incremental builds (build sessions)
|
||||
|
||||
Every `pkh deb` build records a **session** under `/var/tmp/pkh/sessions`:
|
||||
the bootstrapped chroot, the installed build dependencies and the build
|
||||
artifacts of the staged tree. When a build fails (or is interrupted), the
|
||||
session is kept and can be resumed:
|
||||
|
||||
```
|
||||
pkh deb # fails after 25 minutes
|
||||
pkh deb --resume # reuses the chroot, build deps and objects;
|
||||
# only what changed is recompiled
|
||||
pkh deb list # the sessions of this tree, with their ids
|
||||
pkh deb --resume <id> # resume a specific session
|
||||
pkh deb --keep # keep the session even after a successful build
|
||||
# (iterate: edit, `pkh deb --resume --keep`, ...)
|
||||
pkh prune # garbage-collect old sessions (7-day retention)
|
||||
```
|
||||
|
||||
A plain `pkh deb` never reuses a session — everything is rechecked from
|
||||
scratch — and it replaces the session of its target. `pkh deb --resume`
|
||||
refuses to adopt a session built for a different series/architecture.
|
||||
|
||||
## Future improvement ideas
|
||||
|
||||
- pull: try to fetch the correct git branch for series on Debian
|
||||
|
||||
Reference in New Issue
Block a user