From 37883c7d8b4c8b54799586047ce5824461494d8e Mon Sep 17 00:00:00 2001 From: Jguer Date: Tue, 18 Jul 2017 09:37:12 +0100 Subject: [PATCH] Fixes Ignore Group and Ignore Pkg. References #39 --- upgrade/u.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/upgrade/u.go b/upgrade/u.go index 41a03081..ef4a8e16 100644 --- a/upgrade/u.go +++ b/upgrade/u.go @@ -253,6 +253,21 @@ func repo(local []alpm.Package) (Slice, error) { slice := Slice{} for _, pkg := range local { + for _, ignorePkg := range config.AlpmConf.IgnorePkg { + if pkg.Name() == ignorePkg { + continue primeloop + } + } + + for _, ignoreGroup := range config.AlpmConf.IgnoreGroup { + for _, group := range pkg.Groups().Slice() { + if group == ignoreGroup { + continue primeloop + + } + } + } + newPkg := pkg.NewVersion(dbList) if newPkg != nil { slice = append(slice, Upgrade{pkg.Name(), newPkg.DB().Name(), pkg.Version(), newPkg.Version()})