Refuse the China region off x86 until #13690 renders ARM pacman

Integration only.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-12 02:57:07 -04:00
1 parent 84450ffc19
commit 1dbe97d9b7
3 files changed
+15 -1

No files matched your search

+6
View File
@@ -32,6 +32,12 @@ if [[ $channel != "stable" && $channel != "rc" && $channel != "edge" ]]; then
exit 1
fi
# The cn profile renders x86 pacman only (omarchy #13690).
if [[ $1 == "cn" && $(omarchy-hw-platform) != "x86" ]]; then
echo "The China region needs an x86 machine; $(omarchy-hw-platform) has no China profile yet" >&2
exit 1
fi
if [[ $1 == "cn" ]]; then
# Upgrade first: the keyring install below syncs new databases.
omarchy-update-pacman -Syu --noconfirm
+1 -1
View File
@@ -43,7 +43,7 @@ omarchy, each a fork branch:
- `cn-developer-mirrors` on #13690: the `cn` developer mirrors at install.
- `cn-region-switch` on `cn-developer-mirrors`: `omarchy region`, Setup > Region, China Apps, `manual/52-china.md`; English only.
`omarchycn` merges them onto `quattro` and adds what no PR can carry yet: the Chinese wording for Region and China Apps and the language half of the China manual (needs both language and region), and an integration-only pacman resolution until #13690 rebases onto upstream's ARM templates. Known failure there: `pacman-templates-test` expects x86 refresh to copy templates directly, which #13690 replaces with a render.
`omarchycn` merges them onto `quattro` and adds what no PR can carry yet: the Chinese wording for Region and China Apps and the language half of the China manual (needs both language and region), and, until #13690 rebases onto upstream's ARM templates, an integration-only pacman resolution and a guard that refuses `omarchy region cn` off x86. Known failure there: `pacman-templates-test` expects x86 refresh to copy templates directly, which #13690 replaces with a render.
## Tasks
+8
View File
@@ -20,6 +20,7 @@ for command in omarchy-refresh-pacman omarchy-system-logout pacman-key pacman om
done
printf '#!/bin/bash\necho "omarchy-update-pacman $*" >>"%s"\n[[ -z ${STUB_UPDATE_FAIL:-} ]]\n' "$calls" >"$test_tmp/bin/omarchy-update-pacman"
printf '#!/bin/bash\necho "${STUB_CHANNEL:-stable}"\n' >"$test_tmp/bin/omarchy-version-channel"
printf '#!/bin/bash\necho "${STUB_PLATFORM:-x86}"\n' >"$test_tmp/bin/omarchy-hw-platform"
printf '#!/bin/bash\n[[ $1 == env ]] && shift\nexec env "$@"\n' >"$test_tmp/bin/sudo"
printf '#!/bin/bash\necho "gum $*" >>"%s"\nexit "${GUM_ANSWER:-1}"\n' "$calls" >"$test_tmp/bin/gum"
chmod +x "$test_tmp/bin"/*
@@ -58,6 +59,13 @@ fi
[[ $(omarchy-region) == "Global" ]] || fail "a refused switch changes nothing"
pass "an unknown region or an unclear channel is refused"
: >"$calls"
if output=$(STUB_PLATFORM=aarch64-apple omarchy-region cn 2>&1); then
fail "an ARM machine refuses the China region" "$output"
fi
[[ $(omarchy-region) == "Global" && ! -s $calls ]] || fail "a refused ARM switch changes nothing" "$(<"$calls")"
pass "an ARM machine refuses the China region before changing anything"
: >"$calls"
if output=$(STUB_UPDATE_FAIL=1 omarchy-region cn 2>&1); then
fail "switching to China fails when the upgrade fails" "$output"