1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-30 17:42:06 -04:00

Revert "system updater: make all distros use terminal"

This reverts commit 1467f5dba9.
This commit is contained in:
bbedward
2026-04-29 14:56:54 -04:00
parent 1467f5dba9
commit 3b96c6ab22
15 changed files with 222 additions and 98 deletions

View File

@@ -15,10 +15,11 @@ func init() {
type rpmOstreeBackend struct{}
func (rpmOstreeBackend) ID() string { return "rpm-ostree" }
func (rpmOstreeBackend) DisplayName() string { return "rpm-ostree" }
func (rpmOstreeBackend) Repo() RepoKind { return RepoOSTree }
func (rpmOstreeBackend) NeedsAuth() bool { return true }
func (rpmOstreeBackend) ID() string { return "rpm-ostree" }
func (rpmOstreeBackend) DisplayName() string { return "rpm-ostree" }
func (rpmOstreeBackend) Repo() RepoKind { return RepoOSTree }
func (rpmOstreeBackend) NeedsAuth() bool { return true }
func (rpmOstreeBackend) RunsInTerminal() bool { return false }
func (b rpmOstreeBackend) IsAvailable(ctx context.Context) bool {
if !commandExists("rpm-ostree") {
@@ -115,9 +116,10 @@ func bootedDeployment(deps []ostreeDeployment) *ostreeDeployment {
return nil
}
func (rpmOstreeBackend) UpgradeCommand(opts UpgradeOptions) (string, error) {
func (rpmOstreeBackend) Upgrade(ctx context.Context, opts UpgradeOptions, onLine func(string)) error {
argv := []string{"rpm-ostree", "upgrade"}
if opts.DryRun {
return "rpm-ostree upgrade --check", nil
argv = append(argv, "--check")
}
return "rpm-ostree upgrade", nil
return Run(ctx, argv, RunOptions{OnLine: onLine})
}