Skip to content

Refresh the signing keyrings only when a newer version is out - #15034

Merged
dhh merged 2 commits into
quattrofrom
update-keyring-needed
Oct 12, 2026
Merged

dhh merged 2 commits into
quattrofrom
update-keyring-needed

Conversation

@dhh

@dhh dhh commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

What

omarchy-update-keyring now runs pacman -Sy --needed --noconfirm archlinux-keyring … instead of reinstalling the keyring(s) on every update. The stderr filter that hid pacman's is up to date -- reinstalling warning now hides the --needed equivalent, is up to date -- skipping.

Why

Every omarchy update reinstalled archlinux-keyring (and archlinuxarm-keyring / platform keyrings), which reruns the package's pacman-key --populate + trust updates. /var/log/pacman.log on a current machine shows it on every update:

[09:07:34] Running 'pacman -Sy --noconfirm archlinux-keyring'
[09:07:34] reinstalled archlinux-keyring (20260909-1)
[09:07:36] Running '/usr/bin/pacman -Syu --noconfirm ...'

About 2s per update, more on slower machines (gpg trust-db work).

The old comment said the keyring "can be updated without a package version bump". That isn't how the Arch repos work: a sync database entry is keyed by version, so new or revoked keys can only reach a machine as a new pkgver/pkgrel, which --needed still installs. The installed version was already populated when it was installed, so reinstalling it again only repeats that populate.

Unchanged: the keyring step still syncs (-Sy) so it sees the newest keyring before the main transaction, and omarchy-update-system-pkgs still does the full -Syu straight after, so this doesn't add a partial-upgrade window. That second sync is left alone: the databases are fresh by then, so it costs well under a second, and dropping -y there would only make the main transaction depend on this step having synced.

Verification

  • test/shell.d/update-keyring-test.sh now expects --needed for Arch, Arch Linux ARM and platform keyrings, and checks that only the up-to-date notice is filtered while other warnings still reach stderr.
  • ./test/cli passes.

🤖 Generated with Claude Code

Every update reinstalled archlinux-keyring, rerunning its pacman-key populate, though new and revoked keys only reach the repositories as a new package version. --needed keeps the refresh and drops the repeat.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@greptile-apps

greptile-apps Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the warning test now waits for complete stderr.

Summary

The PR makes omarchy-update-keyring skip current keyring packages while still installing newer versions.

  • Keyring refreshes skip packages that are already current.

Reviews (2) · Last reviewed commit: "Read the keyring test's stderr to EOF be..." · Reviewed by Greptile

Comment thread test/shell.d/update-keyring-test.sh Resolved
@dhh
dhh merged commit 15d9544 into quattro Oct 12, 2026
1 check passed
@dhh
dhh deleted the update-keyring-needed branch October 12, 2026 13:34
@jandrusk

Copy link
Copy Markdown

Intentional tradeoff looks sound for day-to-day updates: pacman -Sy --needed on keyrings instead of always reinstalling.

One thing to confirm with maintainers: Arch has occasionally shipped keyring content updates that relied on reinstall-without-version-bump in the past. The PR asserts rotations always bump the package version — if that's the current Arch policy, this is ready; if not, --needed could miss a revoke until the next version.

Tests/docs updated cleanly. Not blocking from my side if that package-version assumption holds.

ryanrhughes pushed a commit that referenced this pull request Oct 16, 2026
* Refresh the signing keyrings only when a newer version is out

Every update reinstalled archlinux-keyring, rerunning its pacman-key populate, though new and revoked keys only reach the repositories as a new package version. --needed keeps the refresh and drops the repeat.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Read the keyring test's stderr to EOF before checking it

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 15d9544)

Backport note: v4-0-5 refreshes only archlinux-keyring (no platform
keyrings from #14431), so only the --needed change applies here.
@emirb emirb added this to the 4.0.5 milestone Oct 17, 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.

3 participants