images: remove the docker field
The 'docker' bit on model.Image was unused at runtime — every code path that branched on it had been removed earlier, leaving only the field, the SQL column, the --docker flag, and the #feature:docker sentinel that BuildMetadataPackages emitted into a hash file. None of those have callers anymore. Strip the field from the model, the API params, the SQLite column, the CLI flag, and BuildMetadataPackages's signature. Add migration 2 (drop_images_docker) so existing installs lose the column on next daemon start. ALTER TABLE ... DROP COLUMN is fine: SQLite has supported it since 3.35 (2021). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
408ad6756c
commit
6c37fec17b
9 changed files with 23 additions and 28 deletions
|
|
@ -309,7 +309,7 @@ func TestImageRegisterFlagsExist(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("find register: %v", err)
|
||||
}
|
||||
for _, flagName := range []string{"name", "rootfs", "work-seed", "kernel", "initrd", "modules", "docker"} {
|
||||
for _, flagName := range []string{"name", "rootfs", "work-seed", "kernel", "initrd", "modules"} {
|
||||
if register.Flags().Lookup(flagName) == nil {
|
||||
t.Fatalf("missing flag %q", flagName)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,6 @@ func (d *deps) newImageRegisterCommand() *cobra.Command {
|
|||
cmd.Flags().StringVar(¶ms.InitrdPath, "initrd", "", "initrd path")
|
||||
cmd.Flags().StringVar(¶ms.ModulesDir, "modules", "", "modules dir")
|
||||
cmd.Flags().StringVar(¶ms.KernelRef, "kernel-ref", "", "name of a cataloged kernel (see 'banger kernel list')")
|
||||
cmd.Flags().BoolVar(¶ms.Docker, "docker", false, "mark image as docker-prepared")
|
||||
_ = cmd.RegisterFlagCompletionFunc("kernel-ref", d.completeKernelNames)
|
||||
return cmd
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue