feat(module): add PlanForce to Module interface with stubs

This commit is contained in:
MDietermann
2026-04-14 21:49:09 +02:00
parent e6e12ab5fd
commit d525646f3a
19 changed files with 96 additions and 0 deletions

View File

@@ -49,6 +49,12 @@ type Module interface {
Meta() Meta
Detect(ctx context.Context) (State, error)
Plan(ctx context.Context, current State) (Plan, error)
// PlanForce returns a plan that reapplies the module unconditionally,
// ignoring current detected state. Used by `archduino install --force`.
// Implementations should produce a plan equivalent to a from-scratch
// install — reinstall packages without pacman's --needed guard and
// rewrite managed config files.
PlanForce(ctx context.Context) (Plan, error)
Apply(ctx context.Context, plan Plan, r Reporter) error
Verify(ctx context.Context) error
}