`banger image register --kernel-ref <name>` now substitutes for the --kernel/--initrd/--modules triple. The daemon looks the name up via kernelcat.ReadLocal under d.layout.KernelsDir, populates the three paths from the resolved entry, then continues through the existing validate/persist flow unchanged. Passing both --kernel-ref and any of --kernel/--initrd/--modules is rejected — at the CLI layer (before starting the daemon) and defensively at the RPC layer. A missing catalog entry produces a clear "run 'banger kernel list'" message. Once registered, the image stores the resolved absolute paths, so deleting the catalog entry later does not invalidate already-registered images — managed image build still copies the kernel into its artifact dir per imagemgr.StageBootArtifacts. Tests cover: resolution success (absolute KernelPath populated from catalog), mutual-exclusion rejection, and missing-entry error. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| banger.go | ||
| bangerd.go | ||
| cli_test.go | ||