diff --git a/cmd.go b/cmd.go index 26865c05..1441f3b5 100644 --- a/cmd.go +++ b/cmd.go @@ -296,6 +296,10 @@ func handleConfig(option, value string) bool { config.SudoLoop = true case "nosudoloop": config.SudoLoop = false + case "provides": + config.Provides = true + case "noprovides": + config.Provides = false default: return false } diff --git a/config.go b/config.go index 00a9c8f4..105b397a 100644 --- a/config.go +++ b/config.go @@ -54,6 +54,7 @@ type Configuration struct { Devel bool `json:"devel"` CleanAfter bool `json:"cleanAfter"` GitClone bool `json:"gitclone"` + Provides bool `json:"provides"` } var version = "5.688" @@ -152,6 +153,7 @@ func defaultSettings(config *Configuration) { config.AnswerEdit = "" config.AnswerUpgrade = "" config.GitClone = true + config.Provides = true } // Editor returns the preferred system editor. diff --git a/depPool.go b/depPool.go index ad899ee2..0e082e6b 100644 --- a/depPool.go +++ b/depPool.go @@ -9,8 +9,6 @@ import ( rpc "github.com/mikkeloscar/aur" ) -const PROVIDES = true - type target struct { Db string Name string @@ -228,10 +226,7 @@ func (dp *depPool) cacheAURPackages(_pkgs stringSet) error { return nil } - //TODO: config option, maybe --deepsearh but aurman uses that flag for - //something else already which might be confusing - //maybe --provides - if PROVIDES { + if config.Provides { err := dp.findProvides(pkgs) if err != nil { return err