Files
omarchycn/install/orchestrator/phases_impl.py
T
Ryan Hughes 2beda6abed Scaffold Python orchestrator + split install.sh / finalize.sh
Chunk 1 of the C3 refactor: replace the two-pass install model (archinstall
CLI + custom shell dance + chroot bash installer) with a single Python
orchestrator that owns phase ordering, using archinstall as a library
subsystem.

Splits the bash entry point into two:
- install.sh: online entry point. Ensures omarchy runtime + base.packages
  are installed/up to date, then exec's finalize.sh.
- finalize.sh: the in-target portion (preflight + packaging + config +
  login + post-install). Called by install.sh (online) AND by the
  orchestrator after arch-chroot -u $USER (offline).

Adds the orchestrator skeleton under install/orchestrator/:
- main.py: entry point, builds + runs the phase list
- context.py: InstallContext (parsed configurator JSON + invocation paths)
- phases.py: phase state machine (logging + state.json + error wrapping)
- phases_impl.py: stubbed phase implementations (filled in by chunks 2-6)
- archinstall_adapter.py: thin compat wall around archinstall lib imports
  (only this module imports from archinstall.*)
- ui.py: gum subprocess wrappers so the orchestrator keeps the same
  styled-terminal UX as the bash installer

Updates bin/omarchy-install to dispatch:
- --config <json> in args → python -m orchestrator.main (ISO install)
- anything else → bash install.sh (online rerun on installed system)

Concrete phase logic lands in subsequent chunks. All phases currently
raise NotImplementedError; the orchestrator imports cleanly and --help
works as a smoke check.
2026-06-04 18:34:35 -04:00

64 lines
1.6 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Concrete phase implementations.
Each function takes the InstallContext and either returns or raises. Phases are
small wrappers — heavy lifting lives in archinstall_adapter (for Arch substrate
work) and helpers.* (for Omarchy-specific work).
Most are stubbed until Chunks 26 land. Keeping them here so the phase wiring
in main.py is testable end-to-end as a smoke check ('every phase imports
cleanly') from Chunk 1 onwards.
"""
from __future__ import annotations
from . import archinstall_adapter as arch
from .context import InstallContext
def prepare_live(ctx: InstallContext) -> None:
raise NotImplementedError("Chunk 2")
def cleanup_disk(ctx: InstallContext) -> None:
raise NotImplementedError("Chunk 2")
def partition_and_mount(ctx: InstallContext) -> None:
raise NotImplementedError("Chunk 2")
def install_base(ctx: InstallContext) -> None:
raise NotImplementedError("Chunk 2")
def install_bootloader(ctx: InstallContext) -> None:
raise NotImplementedError("Chunk 2")
def write_limine_config(ctx: InstallContext) -> None:
raise NotImplementedError("Chunk 3")
def install_early_omarchy_packages(ctx: InstallContext) -> None:
raise NotImplementedError("Chunk 4")
def create_user(ctx: InstallContext) -> None:
raise NotImplementedError("Chunk 2")
def install_omarchy_runtime(ctx: InstallContext) -> None:
raise NotImplementedError("Chunk 4")
def run_chroot_finalizer(ctx: InstallContext) -> None:
raise NotImplementedError("Chunk 5")
def validate_boot(ctx: InstallContext) -> None:
raise NotImplementedError("Chunk 6")
def finish(ctx: InstallContext) -> None:
raise NotImplementedError("Chunk 6")