Skip to content

dead-distro-fields: mirrorlist_url and keyring_init_cmd have zero consumers #477

Closed

Description

@atrawog

What

Two authored #Distro fields have zero Go consumers anywhere in the umbrella:

  • #Pacstrap.mirrorlist_url → spec.Pacstrap.MirrorlistURL
  • #Pacstrap.keyring_init_cmd → spec.Pacstrap.KeyringInitCmd
$ grep -rn 'MirrorlistURL'  --include='*.go' . | grep -v 'cue_types_gen|_test|/docs/'
$ grep -rn 'KeyringInitCmd' --include='*.go' . | grep -v 'cue_types_gen|_test|/docs/'

Both return nothing. The only occurrences are the generated cue_types_gen.go and the
declarations in spec/schema/distro.cue.

Why it matters

cachyos authors both today:

keyring_init_cmd: |
    pacman-key --init && pacman-key --populate archlinux && \
    pacman-key --recv-keys F3B607488DB35A47 && \
    pacman-key --lsign-key F3B607488DB35A47
mirrorlist_url: https://mirror.cachyos.org/mirrorlist.txt

That reads as configuration and does nothing. Anyone adding a distro copies it — which is
exactly what nearly happened in #476, where the omarchy entity's mirror pin
and packaging key looked like a textbook use for both fields. They are instead expressed
through runtime_pacman_conf and a pacman-key step in a candy, with a comment recording
why. A field that looks like the right answer and silently isn't is worse than no field.

Exit

Either wire them (a mirrorlist writer at pacstrap time; a keyring init before the first
transaction) or delete them. Deleting is an authored-wire-key removal, so it needs a
#SchemaVersion bump plus a remove_key migration op — the same shape as the
stripCandyLibvirtField and stripDeployShellOverlay cutovers already recorded in
version.cue.

Whichever way it goes, cachyos's two authored values must be migrated in the same pass:
its keyring init currently relies on pacstrap -K doing the job instead, and its mirrorlist
on the [cachyos] extra_repo servers.

Scope

  • spec/schema/distro.cue — the two fields
  • spec/schema/migrations.cue + plugin-migrate — the removal ops, if deleting
  • charly/charly/charly.yml — the cachyos entity's two authored values

Raised from #476 (the omarchy distro entity), where using them was
considered and rejected on this evidence.

Activity

  1. atrawog commented on Aug 30, 2026

    @atrawog
    ContributorAuthor

    Done — all three instances merged.

    Repo PR What
    opencharly/charly #484 the authored usages in the arch and cachyos pacstrap blocks
    opencharly/spec #77 the #Pacstrap declarations + regenerated cue_types_gen.go
    opencharly/plugin-distro #5 the plugin's own schema copy + regenerated params

    Ordering was forced: removing a declaration before its authored usage would reject a charly.yml that still writes the field. Authored usage first, then the two schemas. At no point was an authored field rejected, and no live consumer was left without its field — there were none, which is the whole point.

    The zero-consumer claim held up at every step, and charly's own omarchy pacstrap block already carried comments explaining it deliberately avoided both fields because they were dead — that comment is gone too, since there is nothing left to warn about.

    One thing found on the way, fixed in the same cutover rather than filed: regenerating plugin-distro's params showed the committed cue_types_gen.go had drifted from its own schema — it was missing disk_layout and installer, which the schema already declared. So the plugin was silently ignoring those fields if a distro authored them. Resynced in #5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions