Skip to content

feat: install eza from its release binary where no package exists - #63

Merged
JtheGunner merged 1 commit into
mainfrom
feat/eza-release-fallback
Nov 22, 2026
Merged

JtheGunner merged 1 commit into
mainfrom
feat/eza-release-fallback

Conversation

@JtheGunner

Copy link
Copy Markdown
Owner

Problem

Debian 12 and Ubuntu 22.04 have no eza package. apt-get install eza fails with exit status 100 and modern-aliases is degraded as a whole, which also drops the cat and find aliases although bat and fd are installed.

A release fallback alone would not have fixed it: a fallback stood in for a module's whole package list, so bat and fd would no longer have been installed.

Change

  • [[packages.fallback]] accepts replaces, the manager packages the entry stands in for. The fallback is used only when one of those is unavailable; every other missing package stays with the manager. An unavailable package that replaces does not name also stays with the manager, so its install error degrades the module as before.
  • Without replaces a fallback stands in for the whole package list. No existing module changes behaviour.
  • replaces is validated: each name must be a package the manifest lists for at least one manager.
  • modern-aliases gets a release fallback for eza v0.23.5 with replaces = ["eza"]: the static musl build on Linux x86_64, the glibc build on arm64 (upstream has no musl build there; it needs glibc 2.18).
  • Docs: docs/writing-a-module.md, the README module table, the changelog and CLAUDE.md.

Limits

  • No 32-bit ARM asset: on such a host without an eza package the module is still degraded.
  • A module still has one active fallback, the first entry that fits the host.

Test plan

Ran locally:

  • make test (race detector)
  • make lint

New tests:

  • internal/engine/partial_fallback_test.go: the plan for each combination of unavailable packages; apply installs the manager package and the release binary, records both in the lockfile and has nothing to do on the second run; a failed manager install and a failed download each degrade the module.
  • internal/module/manifest_test.go: replaces accepts listed packages and rejects an unknown name.
  • modules/builtin_test.go: modern-aliases has the eza release entry with assets for amd64 and arm64.

The SHA-256 of both assets was checked against the downloaded archives, and the archive member is eza.

For a reviewer: on Debian 12, run omnishell apply with modern-aliases enabled and open a new shell. command -v eza should resolve to ~/.config/omnishell/vendor/bin/eza, and ls, cat and find should be aliased. This was not run on such a host yet.

Debian 12 and Ubuntu 22.04 have no eza package. The failed install degraded
modern-aliases as a whole, which also dropped the cat and find aliases
although bat and fd were installed.

A fallback so far stood in for a module's whole package list, so a release
entry for eza alone would have left bat and fd uninstalled. A fallback can
now name the packages it stands in for with `replaces`: it is used only
when one of those is unavailable, and the manager still installs the
module's other packages. Without `replaces` nothing changes.

modern-aliases gets a release fallback for eza on Linux x86_64 and arm64.
@JtheGunner
JtheGunner merged commit 9546bb9 into main Nov 22, 2026
5 checks passed
@JtheGunner
JtheGunner deleted the feat/eza-release-fallback branch November 22, 2026 03:27
@JtheGunner JtheGunner mentioned this pull request Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant