Merge reworked #13690: timezone-derived region and channel mirror prepends

Drop the .cn servers.sed twins, the USTC Arch fallback and the closed
#14399 timezone preselection. region.sh follows the installer's marker.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-08 22:43:55 -04:00
commit 4521dac023
25 files changed
+150 -206

No files matched your search

-27
View File
@@ -82,30 +82,3 @@ GUM_ANSWER=0 script -qec "omarchy-region global" /dev/null >/dev/null
grep -qxF 'gum confirm --affirmative Log out now --negative Later Log out now to switch to English and the global mirrors?' "$calls" &&
grep -qx 'omarchy-system-logout ' "$calls" || fail "switching to Global offers to log out in English and logs out on yes" "$(<"$calls")"
pass "a switch in a terminal offers to log out in the new region's language"
rc_migration="$test_tmp/1788112314.sh"
rewrite "$ROOT/migrations/1788112314.sh" "$rc_migration"
cp "$ROOT/default/pacman/mirrorlist-rc" "$root/etc/pacman.d/mirrorlist"
sed -e 's|pkgs.omarchy.org/rc/|pkgs.omarchy.org/edge/|' "$ROOT/default/pacman/pacman-rc.conf" |
sed -f "$ROOT/default/regions/cn/pacman/servers.sed" >"$root/etc/pacman.conf"
bash -e "$rc_migration" >/dev/null
[[ $(grep '^Server' "$root/etc/pacman.conf") == $'Server = https://pkgs.omarchy.cn/rc/$arch\nServer = https://pkgs.omarchy.org/rc/$arch' ]] ||
fail "the rc repository migration moves the .cn twin with its .org server" "$(grep '^Server' "$root/etc/pacman.conf")"
pass "the rc repository migration moves the .cn twin with its .org server"
rename_migration="$test_tmp/1791387144.sh"
rewrite "$ROOT/migrations/1791387144.sh" "$rename_migration"
rm -f "$root/etc/omarchy/region" "$root/etc/environment.d/90-omarchy-china.conf"
mkdir -p "$root/etc/environment.d" "$root/etc/omarchy"
echo china >"$root/etc/omarchy/region"
ln -sfn /usr/share/omarchy/default/region/china/environment.conf "$root/etc/environment.d/90-omarchy-china.conf"
printf '#!/bin/bash\nexit 1\n' >"$test_tmp/bin/ln" && chmod +x "$test_tmp/bin/ln"
if bash -e "$rename_migration" >/dev/null 2>&1; then
fail "a failed link repair fails the migration"
fi
[[ $(<"$root/etc/omarchy/region") == "china" ]] || fail "a failed link repair leaves china for the retry"
rm "$test_tmp/bin/ln"
bash -e "$rename_migration" >/dev/null
[[ $(<"$root/etc/omarchy/region") == "cn" && $(readlink "$root/etc/environment.d/90-omarchy-china.conf") == "$sandbox/default/regions/cn/environment.conf" ]] ||
fail "the rename migration records cn and repoints the links" "$(readlink "$root/etc/environment.d/90-omarchy-china.conf")"
pass "the china rename migration repoints the links before it records cn, so a failure retries"