feat(packages): implement PlanForce to reinstall all packages

Adds Reinstall method to PackageManager and AURHelper interfaces
so modules can invoke the concrete Reinstall helpers behind the
interface. *Pacman and *Yay already satisfy it.
This commit is contained in:
MDietermann
2026-04-14 21:55:08 +02:00
parent 613363e993
commit 58bd532dba
4 changed files with 37 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ import (
type AURHelper interface {
EnsureInstalled(ctx context.Context) error
Install(ctx context.Context, pkgs []string) error
Reinstall(ctx context.Context, pkgs []string) error
}
type Yay struct {

View File

@@ -8,6 +8,7 @@ type PackageManager interface {
Name() string
IsInstalled(ctx context.Context, pkg string) (bool, error)
Install(ctx context.Context, pkgs []string) error
Reinstall(ctx context.Context, pkgs []string) error
Update(ctx context.Context) error
}