Force a database refresh before installing keyrings during the Quattro upgrade (#6615)

The upgrade repoints the mirrorlist and the [omarchy] server, then ran
pacman -Sy. A plain -Sy keeps the legacy database whenever the new server's
copy isn't newer, so the checksums stay stale and every re-download of a
rebuilt package aborts as corrupted.

Fixes #6576

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
David Heinemeier Hansson
2026-08-07 23:52:24 +02:00
committed by GitHub
co-authored by Claude Opus 5
parent 77cf58ccfe
commit f76d058a6d
2 changed files with 15 additions and 2 deletions
+7 -2
View File
@@ -402,11 +402,16 @@ install_keyrings() {
# database's checksum and abort --noconfirm transactions as "corrupted". # database's checksum and abort --noconfirm transactions as "corrupted".
as_root find /var/cache/pacman/pkg -maxdepth 1 -name 'omarchy-*' -delete 2>/dev/null || true as_root find /var/cache/pacman/pkg -maxdepth 1 -name 'omarchy-*' -delete 2>/dev/null || true
as_root pacman -Sy --noconfirm archlinux-keyring omarchy-keyring || { # -Syy forces the database download. configure_pacman_channel just repointed
# the mirrors, and a plain -Sy keeps the legacy database whenever the new
# server's copy isn't newer, leaving stale checksums that no amount of
# re-downloading can satisfy.
as_root pacman -Syy --noconfirm archlinux-keyring omarchy-keyring || {
warn "Keyring package install failed; attempting to trust the Omarchy packaging key directly." warn "Keyring package install failed; attempting to trust the Omarchy packaging key directly."
as_root pacman-key --recv-keys 40DFB630FF42BCFFB047046CF0134EE680CAC571 --keyserver keys.openpgp.org || true as_root pacman-key --recv-keys 40DFB630FF42BCFFB047046CF0134EE680CAC571 --keyserver keys.openpgp.org || true
as_root pacman-key --lsign-key 40DFB630FF42BCFFB047046CF0134EE680CAC571 || true as_root pacman-key --lsign-key 40DFB630FF42BCFFB047046CF0134EE680CAC571 || true
as_root pacman -Sy --noconfirm archlinux-keyring omarchy-keyring as_root pacman -Syy --noconfirm archlinux-keyring omarchy-keyring
} }
} }
+8
View File
@@ -13,6 +13,14 @@ pacman_line=$(grep -n '^configure_pacman_channel$' "$upgrade_to_quattro" | cut -
grep -F 'omarchy-snapshot create || (($? == 127))' "$upgrade_to_quattro" >/dev/null grep -F 'omarchy-snapshot create || (($? == 127))' "$upgrade_to_quattro" >/dev/null
pass "Omarchy 4 upgrade snapshots the system before mutation" pass "Omarchy 4 upgrade snapshots the system before mutation"
# The mirrors are repointed immediately before the keyrings go in, so only a
# forced refresh replaces the legacy database and its stale checksums.
grep -F 'pacman -Syy --noconfirm archlinux-keyring omarchy-keyring' "$upgrade_to_quattro" >/dev/null
if grep -F 'pacman -Sy --noconfirm archlinux-keyring omarchy-keyring' "$upgrade_to_quattro" >/dev/null; then
fail "Omarchy 4 upgrade forces a database refresh before installing keyrings"
fi
pass "Omarchy 4 upgrade forces a database refresh before installing keyrings"
grep -F 'pacman -Syu --needed' "$upgrade_to_quattro" >/dev/null grep -F 'pacman -Syu --needed' "$upgrade_to_quattro" >/dev/null
grep -F 'omarchy-update-aur-pkgs' "$upgrade_to_quattro" >/dev/null grep -F 'omarchy-update-aur-pkgs' "$upgrade_to_quattro" >/dev/null
grep -F 'omarchy-update-available' "$upgrade_to_quattro" >/dev/null grep -F 'omarchy-update-available' "$upgrade_to_quattro" >/dev/null