Skip to content

P2: Adopt & System Management design issues (stale files, single tx, double rollback, mount cleanup, BLS) #23

@TusanHomichi

Description

@TusanHomichi

Summary

Design-level improvements needed in the adoption and system management modules.

Findings

1. Stale files after adoption

  • Files from the original package manager left behind after adoption (cache, configs, lock files).
  • Improvement: Detect and offer cleanup of orphaned package manager artifacts.

2. Single transaction for bulk adoption

  • All packages adopted in one transaction; failure of any one rolls back everything.
  • Improvement: Support partial adoption with per-package transactions and summary report.

3. Double rollback on generation failure

  • If generation build fails after adoption, rollback attempts to undo both adoption and generation, potentially corrupting state.
  • Improvement: Separate rollback scopes for adoption vs. generation phases.

4. Mount namespace cleanup

  • Bind mounts from sandbox setup not always cleaned up on abnormal exit.
  • Improvement: Register cleanup handlers; use mount namespaces that auto-cleanup on exit.

5. BLS (Boot Loader Spec) integration

  • Generation system creates new system roots but doesn't generate BLS entries for boot menu integration.
  • Improvement: Generate BLS entries for each generation to enable boot-time selection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions