Merge omacom/omarchy-iso#241: region from the timezone in one ISO

Drop our --region build, prepare-region.sh, region skel, the preselected
China timezone, the explicit region in the configurator's JSON, Rime
bundling and its pin.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 00:03:17 -04:00
commit 75d00a2036
14 files changed
+409 -618

No files matched your search

+3 -34
View File
@@ -16,7 +16,7 @@ sys.modules.setdefault(
)
from orchestrator import phases_impl # noqa: E402
LINE = "IgnorePkg = omarchy-dev omarchy-settings-dev rime-ice-installer"
LINE = "IgnorePkg = omarchy-dev omarchy-settings-dev"
CONF = "[options]\nHoldPkg = pacman glibc\n\n[core]\nInclude = /etc/pacman.d/mirrorlist\n"
@@ -26,7 +26,7 @@ class PinLocalPackagesTest(unittest.TestCase):
(root / "etc/pacman.conf").write_text(CONF)
pinned_file = root / "pinned-packages"
if pinned:
pinned_file.write_text("omarchy-dev\nomarchy-settings-dev\nrime-ice-installer\n")
pinned_file.write_text("omarchy-dev\nomarchy-settings-dev\n")
ctx = types.SimpleNamespace(target=root, username="test", defer_provisioning=defer)
with mock.patch.object(phases_impl, "PINNED_PACKAGES", pinned_file), \
mock.patch.object(phases_impl.subprocess, "run") as run:
@@ -43,7 +43,7 @@ class PinLocalPackagesTest(unittest.TestCase):
self.assertIn(f'line="{LINE}"', hook.read_text())
self.assertTrue(hook.stat().st_mode & 0o111)
guard = (root / "etc/pacman.d/hooks/00-omarchy-pin-local-builds.hook").read_text()
for package in ("omarchy-dev", "omarchy-settings-dev", "rime-ice-installer"):
for package in ("omarchy-dev", "omarchy-settings-dev"):
self.assertIn(f"Target = {package}\n", guard)
self.assertIn("AbortOnFail", guard)
skel = root / "etc/skel/.config/omarchy/hooks/pre-refresh-pacman.d/pin-local-packages"
@@ -83,36 +83,5 @@ class PinLocalPackagesTest(unittest.TestCase):
self.assertFalse((root / "etc/pacman.d").exists())
class RuntimePackagesTest(unittest.TestCase):
def runtime_packages(self, pinned: str | None) -> list[str]:
with tempfile.TemporaryDirectory() as tmp:
root = Path(tmp)
pinned_file = root / "pinned-packages"
if pinned is not None:
pinned_file.write_text(pinned)
base = root / "omarchy-base.packages"
base.write_text("# base\nfcitx5\ngit\n")
real_path = phases_impl.Path
def path(arg, *rest):
if arg == "/usr/share/omarchy-iso/omarchy-base.packages":
return base
return real_path(arg, *rest)
with mock.patch.object(phases_impl, "PINNED_PACKAGES", pinned_file), \
mock.patch.object(phases_impl, "Path", side_effect=path), \
mock.patch.object(phases_impl, "_early_packages", return_value=["git"]), \
mock.patch.object(phases_impl, "_package_targets", return_value={
"runtime": "omarchy-dev", "settings": "omarchy-settings-dev", "nvim": "omarchy-nvim"}):
return phases_impl._runtime_package_list(types.SimpleNamespace(omarchy_install={"region": "global"}))
def test_local_builds_install_on_every_region(self):
packages = self.runtime_packages("omarchy-dev\nomarchy-settings-dev\nrime-ice-installer\n")
self.assertEqual(packages, ["omarchy-dev", "fcitx5", "rime-ice-installer"])
def test_published_builds_add_nothing(self):
self.assertEqual(self.runtime_packages(None), ["omarchy-dev", "fcitx5"])
if __name__ == "__main__":
unittest.main()