feat: add advanced update management features

This commit is contained in:
2026-05-03 22:55:51 +02:00
parent a22d2e16ea
commit 137290e3d7
7 changed files with 644 additions and 150 deletions

View File

@@ -58,7 +58,10 @@ func status() int {
return 1
}
result, err := updater.CheckWithOptions(ctx, updater.Options{CheckAUR: cfg.CheckAUR})
result, err := updater.CheckWithOptions(ctx, updater.Options{
CheckAUR: cfg.CheckAUR,
IgnoredPackages: cfg.IgnoredPackages,
})
if err != nil {
fmt.Fprintln(os.Stderr, err)
return 1
@@ -85,7 +88,10 @@ func check(args []string) int {
return 1
}
result, err := updater.CheckWithOptions(ctx, updater.Options{CheckAUR: cfg.CheckAUR})
result, err := updater.CheckWithOptions(ctx, updater.Options{
CheckAUR: cfg.CheckAUR,
IgnoredPackages: cfg.IgnoredPackages,
})
if err != nil {
fmt.Fprintln(os.Stderr, err)
return 1
@@ -117,7 +123,10 @@ func notifyUpdates(args []string) int {
return 1
}
result, err := updater.CheckWithOptions(ctx, updater.Options{CheckAUR: cfg.CheckAUR})
result, err := updater.CheckWithOptions(ctx, updater.Options{
CheckAUR: cfg.CheckAUR,
IgnoredPackages: cfg.IgnoredPackages,
})
if err != nil {
fmt.Fprintln(os.Stderr, err)
return 1
@@ -146,6 +155,9 @@ func notifyUpdates(args []string) int {
store.LastReminder = now
store.LastUpdateCount = result.Total()
store.LastCheck = now
store.LastSuccess = now
store.LastSummary = result.Summary()
if err := state.Save(defaultStatePath(), store); err != nil {
fmt.Fprintln(os.Stderr, err)
return 1
@@ -162,7 +174,7 @@ func runGUI(args []string) int {
return 2
}
if err := gui.Run(defaultConfigPath(), !*noOpen); err != nil {
if err := gui.Run(defaultConfigPath(), defaultStatePath(), !*noOpen); err != nil {
fmt.Fprintln(os.Stderr, err)
return 1
}