Skip to content

Order the Omarchy repository above Arch's - #7583

Draft
omarchybot wants to merge 1 commit into
quattrofrom
pacman-repo-priority
Draft

Order the Omarchy repository above Arch's#7583
omarchybot wants to merge 1 commit into
quattrofrom
pacman-repo-priority

Conversation

@omarchybot

Copy link
Copy Markdown
Collaborator

Why

pacman stops at the first repository carrying a name and never compares versions across the rest. With [omarchy] listed last, an Omarchy build of anything Arch also ships is unreachable — pacman -S installs Arch's and pacman -Syu reports nothing to do.

That is why packaging something Arch is slow with cannot work today. yt-dlp is the case in hand: extra is six weeks behind upstream, and six weeks of missing extractor fixes means downloads that simply fail. omacom/omarchy-pkgs#178 packages it, but nothing installs it until the repository outranks extra.

[core] deliberately stays first. Arch keeps the base system; Omarchy takes precedence only over extra and multilib.

The migration

Existing installs have /etc/pacman.conf written once at install time, so the templates alone change nothing for anyone who already runs Omarchy. The migration moves the section in place rather than copying the template over the file — that is what omarchy-refresh-pacman does, and it also resets the channel and discards whatever the user added.

It reorders only when the section trails [extra], and it verifies its own result: a reorder moves lines and changes nothing else, so the file is compared against itself afterwards and left untouched if anything but the order changed. Tested against this machine's live config, the shipped edge/stable/rc templates, a config with no [omarchy] section, one with an extra Usage = All directive, and one with a trailing comment — content preserved in every case, byte-identical where there was nothing to do, and stable across repeated runs.

What this costs, and the sequencing that matters

Ordering above Arch means a package Omarchy publishes must stay ahead of Arch's. An older build no longer sits unused:

command with an Omarchy build older than Arch's
pacman -S <pkg> installs ours
pacman -Syu "nothing to do" — the newer official build is never offered
pacman -Syyuu downgrades to ours, and that is what omarchy-refresh-pacman runs

Four packages are in that state right now: gpu-screen-recorder (5.12.3 vs extra's 6.0.0), intel-lpmd, pinta and umu-launcher (1.1.3 vs multilib's 1.4.4). They are harmless only because the current ordering hides them.

So this must not merge until both are done:

  1. Remove packages Arch has since absorbed omarchy-pkgs#177 removes the three checked-in PKGBUILDs, and Catch a package that has fallen behind Arch omarchy-pkgs#179 adds a check that fails when a package here falls behind Arch.
  2. The already-published artifacts are removed from the mirror itself with bin/repo remove-package on the repository host, for edge and stable both — including gpu-screen-recorder, whose PKGBUILD is already gone but whose package is still in the repository database. Deleting the PKGBUILD stops rebuilds; it does not unpublish what is already there.

Marked draft for that reason.

pacman stops at the first repository carrying a name and never compares versions across the rest, so with [omarchy] listed last, an Omarchy build of anything Arch also ships is unreachable: -S installs Arch's and -Syu reports nothing to do. Packaging something Arch is slow with -- yt-dlp, where a six week old build means downloads that simply fail -- only reaches users if the repository outranks extra.

[core] deliberately stays first. Arch keeps the base system, and Omarchy takes precedence only over extra and multilib.

The migration moves the section in an existing /etc/pacman.conf rather than copying the template over it, because that is what omarchy-refresh-pacman does and it also resets the channel and discards anything the user added. It reorders only when the section trails [extra], and it compares the file against itself afterwards, since a reorder moves lines and changes nothing else -- a result that differs by more than order means the parse misread the config, and it is left alone.

The cost of this ordering is that a package Omarchy publishes has to stay ahead of Arch's. An older build no longer just sits there unused: -Syu stops offering the newer official package and the -Syyuu here downgrades to it. omarchy-pkgs grows a check for exactly that.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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