Repository navigation
Keep a switch to stable or rc from stranding edge on an old omarchy-dev - #15903
Conversation
On edge, omarchy-channel-set stable first runs omarchy-refresh-pacman stable, whose omarchy-update-pacman -Syyuu downgrades to whatever the stable repositories list, and only then installs omarchy and omarchy-settings. Until 2026-10-18 23:06 UTC stable's omarchy.db still listed omarchy-dev and omarchy-settings-dev 4.0.0.r1832 from August, so -uu moved an edge machine from r7052 to r1832. That build predates command-scoped sudo: the wrapper check after the refresh stopped the switch before the swap and printed "Packages are switched. Run 'omarchy update'". They were not. The machine was left on omarchy-dev r1832 with stable repositories, omarchy update found nothing to do, and r1832's shell has no theme colours on Qt 6.12, so the bar is invisible (#15881, #15879). Stable and rc publish omarchy and omarchy-settings; the -dev pair is edge's. The refresh now passes --ignore omarchy-dev,omarchy-settings-dev for stable and rc, so the swap is the only transaction that touches the pair. pacman warns that it ignores the downgrade, keeps r7052 with its wrapper, and the swap replaces it with the release. The refresh then treats the -dev pair exactly as it does now that the stale build is gone from the repository (pacman still checks the pair's dependencies), so the ignore adds no failure of its own. Doing the swap first instead would put a tree without the wrapper in place before the downgrade-capable refresh, which could then no longer run and would leave edge's newer Arch packages under stable repositories. Edge refreshes are unchanged. The stop now asks pacman which pair is installed (omarchy-dev provides omarchy, so pacman -Q omarchy omarchy-settings answers for either) and says so: with the destination's packages in, it names them and says to run omarchy update; when a transaction before the swap replaced the tree, it names what is installed and says to run the channel switch again, which an r1832 tree completes on its own. In a VM (a 4.0.4 install moved to edge r7052, LUKS, Limine), against the live stable repository while it still listed r1832: unchanged, channel set stable left omarchy-dev r1832 (channel-current edge, version-channel stable), omarchy update did nothing, and after a reboot the shell logged 221 "of undefined" warnings with an empty bar. With this change the same switch installed omarchy 4.0.5, omarchy update finished, and after a reboot the bar was back with no failed units, coredumps or pending migrations. Edge to rc landed on 4.0.6rc1, edge to edge and rc or stable back to edge still work, and leaving dev against a copy of the stale database no longer installs r1832 on the way.
[Medium impact] The change affects pacman refreshes and channel switches on stable and rc. The PR appears safe to merge, with a non-blocking correction needed for recovery messages on older dev builds.
|
|
Reviewed at a10a675 against What ran, on a disposable Omarchy worker:
Reviewed by Claude Opus 5.5 and, as a second opinion, Codex Medium, which found no defect and judged the change proportionate to the problem. It can read this review's working notes, so its agreement is not guaranteed to be independent. Both noted one edge case: ignoring the pair would make the refresh fail if Waiting on the maintainer. |
omacom#15903 added an --ignore for omarchy-dev and omarchy-settings-dev to the stable and rc transaction, on the same line the rollback closes the refresh lock on. Both stay: the ignore list is passed first and the lock fd is closed after it. The rollback test's success case refreshes to stable, so it now expects the ignore. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The refresh now renders pacman's files with omarchy-apply-pacman. This test, added to quattro after the region series began (#15903), builds its own sandbox and did not have the renderer, so its refresh failed before reaching the switch it tests.
…16256) * ✨ feat(region): seed offline chinese input - ✨ make first-login pinyin available without downloads - ⌨️ preserve compose and terminal prefix shortcuts Amp-Thread-ID: https://ampcode.com/threads/T-01a0df38-0ea7-759b-bcff-29da223cc567 Co-authored-by: Amp <[email protected]> * ✨ feat(pacman): preserve regional defaults - ✨ share regional repository generation across install and refresh - 🛡️ reject invalid profiles before replacing configuration Amp-Thread-ID: T-01a0df38-0ea7-759b-bcff-29da223cc567 * ✅ test(region): guard runtime defaults - ✅ protect global behavior and regional mirror ordering - ⌨️ guard personal settings and reserved input shortcuts Amp-Thread-ID: T-01a0df38-0ea7-759b-bcff-29da223cc567 * 📝 docs(region): explain china bootstrap choices - 📝 clarify optional defaults, trust requirements, and opt-out behavior -⚠️ document snapshot compatibility and release validation limits Amp-Thread-ID: T-01a0df38-0ea7-759b-bcff-29da223cc567 * 🐛 fix(channel): keep regional repos when switching to dev - 🛡️ refuse a dev checkout that lacks this machine's region profile before linking it, since its own refresh would silently replace the regional pacman files - ✅ isolate channel tests from the host region marker Co-Authored-By: Claude Opus 5.5 <[email protected]> * 🐛 fix(pacman): keep existing config file modes - 🐛 refresh used to copy over the existing files, so a customized mode must survive the shared regional applicator too Co-Authored-By: Claude Opus 5.5 <[email protected]> * 📝 docs(region): drop the unreachable menu input gate - 📝 the menu bypasses the input method, so requiring Pinyin there made the release procedure impossible until upstream fixes it - 📝 record the required `skel` profile and the dev-switch region check Co-Authored-By: Claude Opus 5.5 <[email protected]> * ♻️ refactor(pacman): render regional config without root - 🔒 upstream refresh now gives root only command-scoped copies, so regional files are rendered as the caller and installed with the same four `sudo cp` calls - ✅ exercise refresh only inside the sudo-boundary sandbox; the old host-level test reached real sudo once refresh pinned its PATH Co-Authored-By: Claude Opus 5.5 <[email protected]> * 📝 docs(plans): move the china proposal to a discussion - 📝 upstream plans are implementation plans; the open questions belong in the discussion that links these changes Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01K3Jna1ogUUviYLJzhsG6Vr * 🔥 refactor(region): drop input defaults from the cn profile - 🔥 keep this change to the regional build architecture; Chinese input gets its own proposal instead of fixing one engine here - ✅ assert the shipped profile adds only its repository keyring Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01K3Jna1ogUUviYLJzhsG6Vr * 📝 docs(region): scope the cn profile to repositories - 📝 frame USTC and ArchLinuxCN as a bridge until an official China mirror exists - 📝 record that language, timezone, and input defaults follow as separate changes Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01K3Jna1ogUUviYLJzhsG6Vr * 🐛 fix(pacman): remove the render dir on every refresh exit - 🐛 a failed render, a refused sudo prompt, or a signal left the scratch directory behind; repeated attempts piled them up - 🔒 the cleanup runs before the sudo revocation, which stays the last step of the exit path Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SdXqTwm63rRMwotZ1xqLC8 * 🐛 fix(channel): require a usable region profile for dev - 🐛 an empty profile directory or a helper that cannot run passed the guard, linked dev, and then broke the refresh - ✅ the success case now uses a complete profile Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SdXqTwm63rRMwotZ1xqLC8 * ✅ test(pacman): isolate the regional refresh boundary test - ✅ the render read the host's region marker, so a global machine never rendered China and a China machine failed on missing fragments - ✅ check the finished China files root installs, not only the copy order Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SdXqTwm63rRMwotZ1xqLC8 * ✅ test(pacman): sandbox the region for every boundary test - ✅ The channel and update boundary tests copied the real render and dev-region guard, so on a China install they read the host's `/etc/omarchy/region` and failed before reaching their checks - ♻️ The shared fixture now points both lookups at a sandbox target that starts global, and the regional test only writes `cn` there Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SdXqTwm63rRMwotZ1xqLC8 * ✨ feat(region): map timezones to regions - ✨ one iso serves every region, so the installer derives it from the timezone the user already picks - ✅ reject unknown zones and zones claimed by two regions Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g * 📝 docs(region): describe timezone-derived regions - 📝 the --region build flag is gone, so the installer contract and validation plan change with it Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g * ✨ feat(region): put the china channel mirrors first - ✨ omarchy now runs per-channel china replicas, so they should lead instead of trailing as a fallback - ♻️ prepend per-channel fragments so each channel's own mirror stays the fallback - 🔥 drop the ustc arch mirror, which was never a stable or rc snapshot replica Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g * 📝 docs(region): explain mirror order and fallback - 📝 pacman's three-error skip and first-server databases decide what the china replicas must serve Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g * 🐛 fix(channel): require every region fragment for dev - 🐛 leaving dev refreshes stable or rc with the checkout's tools, so a profile missing those fragments would drop regional repositories - ✅ refuse a profile missing any single fragment Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g * ✅ test(region): derive china zones from tzdata - ✅ dropping a backward-compatible zone name from the profile now fails the test Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g * ♻️ refactor(pacman): branch on render with if/else - ♻️ follow the repo style instead of exiting early to skip the install block Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g * 📝 docs(region): state marker mode and archlinuxcn risk - 📝 refresh reads the marker unprivileged, and rolling archlinuxcn packages can outpace stable snapshots Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g * 📝 docs(region): scope the refresh render boundary - 📝 state that same-user code is outside the refresh boundary, so reviewers see the trade-off was deliberate Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g * 🐛 fix(test): skip exact zone match without tzdata.zi - 🐛 minimal containers lack the link table, so the exact china zone check failed on a correct profile Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g * ✅ test(region): pin the platform in region tests - ✅ tests no longer depend on the host's hardware, so they pass on ARM dev machines and the incomplete-profile case fails on the missing fragment, not the missing platform helper - 📝 profiles add x86 repositories only, so ARM machines keep their own templates in a region Co-Authored-By: Claude Opus 5.5 <[email protected]> * ✅ test(pacman): follow finalization into `omarchy-apply-pacman` - ✅ finalization and refresh now restore templates through the apply command, so the template and deferred-hardware fixtures redirect its target etc instead of the post-install script's, and the refresh expects the unprivileged render - ♻️ the apply command asks `omarchy-hw-platform` from PATH like its callers, so the fixtures' platform stubs reach it Co-Authored-By: Claude Opus 5.5 <[email protected]> * Expect the rendered refresh in quattro's newer channel tests Two quattro changes postdate the region series. #15903 keeps a refresh on the machine's own channel and tests it by the template root copies into /etc; with the renderer, root copies the rendered file, so those checks now look for the template in the render step. #16065 gave aarch64 stable and rc, so the region test no longer expects aarch64 to reject them: it applies every channel a platform has templates for and expects the rest to be refused. * Point China installs at Omarchy's China mirrors only, with no new repository The China profile added ArchLinuxCN from USTC and its keyring. Nothing installed or updated needs that repository, and pacman trusts a populated keyring for every repository, so its packagers' keys would have been able to sign packages for [core] and [omarchy] on every China machine; it is also rolling while stable and rc are snapshots. It is gone, with the keyring package. What China installs need is the same packages from closer servers. Besides the channel's Arch mirror on omarchy.cn, the [omarchy] repository now lists pkgs.omarchy.cn/<channel> first, the China replica of pkgs.omarchy.org, which carries the largest downloads. Both replicas serve the same signed packages, .org stays the fallback, and global installs are byte for byte unchanged. A test pins Hong Kong, Macau and Taiwan, under every tzdata name, to no region. Existing installs stay global; the doc gives the two commands to opt in. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Find the rendered files from root's copy in the regional refresh test The China render now writes pacman.conf with awk rather than copying the template, so the test reads the rendered directory from root's copy instead. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Check the China profile's mirrors, not its exact file list The region test listed every file in default/regions/cn, so adding any unrelated file to the profile failed it. What the test is for is that the profile adds no repository and no key: every fragment is a Server line for an omarchy.cn mirror. Keep that check and drop the list. * Give the stale -dev build test the pacman renderer The refresh now renders pacman's files with omarchy-apply-pacman. This test, added to quattro after the region series began (#15903), builds its own sandbox and did not have the renderer, so its refresh failed before reaching the switch it tests. --------- Co-authored-by: Kros Dai <[email protected]> Co-authored-by: Amp <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Omarchybot <[email protected]>
On edge,
omarchy channel set stable(andrc) first runsomarchy-refresh-pacman <channel>. Its-Syyuudowngrades to whatever the destination repositories list, and only after that does the switch installomarchyandomarchy-settings. Until 2026-10-18 23:06 UTC, stable'somarchy.dbstill listedomarchy-devandomarchy-settings-dev4.0.0.r1832 from August, so-uumoved an edge machine from r7052 to r1832.That build predates command-scoped sudo, so the wrapper check after the refresh stopped the switch before the swap and printed "Packages are switched. Run 'omarchy update' from a new terminal to finish". The packages had not been switched:
omarchy-devr1832 with stable repositories;omarchy channel currentsaid edge while the repositories said stable;omarchy updatefound nothing to do;Stable and rc publish
omarchyandomarchy-settings; the-devpair belongs to edge. The refresh now passes--ignore omarchy-dev,omarchy-settings-devfor stable and rc, so the swap is the only transaction that touches the pair: pacman warns that it is ignoring the downgrade, keeps r7052 and its wrapper, and the swap installs the release. The ignore adds no new way to fail, since pacman still checks the pair's dependencies. Swapping first instead would put a tree without the wrapper in place before the downgrade-capable refresh, which could then no longer run, and edge's newer Arch packages would stay behind under stable repositories. Edge refreshes are unchanged.When the switch has to stop, it now asks pacman which pair is installed and says so. If the destination's packages are in, it names them and says to run
omarchy update. If a transaction before the swap replaced the tree, it names what is installed and says to runomarchy channel set <channel>again from a new terminal, which an r1832 tree completes on its own.Removing the stale build from the repository fixed today's case; this keeps the switch safe whatever a destination repository lists. Machines already stranded on r1832 recover with
omarchy channel set stable. It also covers the replacement prompt in #15733, since pacman skips replacement questions for ignored packages.Refs #15881
Refs #15879
Refs #15733
Fixes #15733