From 5c7d6fa3bed5a330a72ca25a751aa69fe41ddaf8 Mon Sep 17 00:00:00 2001 From: morganamilo Date: Tue, 4 Sep 2018 20:01:49 +0100 Subject: [PATCH] Fix --rebuild logic --- depPool.go | 9 +++------ install.go | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/depPool.go b/depPool.go index ef6ee0a1..a598e56b 100644 --- a/depPool.go +++ b/depPool.go @@ -301,14 +301,12 @@ func (dp *depPool) resolveAURPackages(pkgs stringSet, explicit bool) error { continue } - //has satisfier installed: skip - _, isInstalled := dp.LocalDb.PkgCache().FindSatisfier(dep) - if isInstalled == nil { + _, isInstalled := dp.LocalDb.PkgCache().FindSatisfier(dep) //has satisfier installed: skip + repoPkg, inRepos := dp.SyncDb.FindSatisfier(dep) //has satisfier in repo: fetch it + if isInstalled == nil && (config.ReBuild != "tree" || inRepos == nil) { continue } - //has satisfier in repo: fetch it - repoPkg, inRepos := dp.SyncDb.FindSatisfier(dep) if inRepos == nil { dp.ResolveRepoDependency(repoPkg) continue @@ -321,7 +319,6 @@ func (dp *depPool) resolveAURPackages(pkgs stringSet, explicit bool) error { } err = dp.resolveAURPackages(newAURPackages, false) - return err } diff --git a/install.go b/install.go index 229662e0..623b0ecb 100644 --- a/install.go +++ b/install.go @@ -935,7 +935,7 @@ func buildInstallPkgbuilds(dp *depPool, do *depOrder, srcinfos map[string]*gosrc for _, b := range base { isExplicit = isExplicit || dp.Explicit.get(b.Name) } - if config.ReBuild == "no" || (config.ReBuild == "yes" && isExplicit) { + if config.ReBuild == "no" || (config.ReBuild == "yes" && !isExplicit) { for _, split := range base { pkgdest, ok := pkgdests[split.Name] if !ok {