diff --git a/internal/config/config.go b/internal/config/config.go index 7746258..3fba58b 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -8,8 +8,9 @@ import ( ) var defaultConfig = types.Config{ - RootCmd: "sudo", - PagerStyle: "native", + RootCmd: "sudo", + PagerStyle: "native", + IgnorePkgUpdates: []string{}, Repos: []types.Repo{ { Name: "default", diff --git a/internal/types/config.go b/internal/types/config.go index 9261673..ad24571 100644 --- a/internal/types/config.go +++ b/internal/types/config.go @@ -2,9 +2,10 @@ package types // Config represents the LURE configuration file type Config struct { - RootCmd string `toml:"rootCmd"` - PagerStyle string `toml:"pagerStyle"` - Repos []Repo `toml:"repo"` + RootCmd string `toml:"rootCmd"` + PagerStyle string `toml:"pagerStyle"` + IgnorePkgUpdates []string `toml:"ignorePkgUpdates"` + Repos []Repo `toml:"repo"` } // Repo represents a LURE repo within a configuration file diff --git a/upgrade.go b/upgrade.go index ac6ad80..0668099 100644 --- a/upgrade.go +++ b/upgrade.go @@ -77,6 +77,10 @@ func checkForUpdates(ctx context.Context, mgr manager.Manager, info *distro.OSRe var out []db.Package for pkgName, pkgs := range found { + if slices.Contains(cfg.IgnorePkgUpdates, pkgName) { + continue + } + if len(pkgs) > 1 { // Puts the element with the highest version first slices.SortFunc(pkgs, func(a, b db.Package) bool {