mirror of
https://github.com/Jguer/yay
synced 2024-10-31 04:12:51 +00:00
Implement config option for provider searching
This commit is contained in:
parent
33d056e9ac
commit
c464af6b9b
3 changed files with 7 additions and 6 deletions
4
cmd.go
4
cmd.go
|
@ -296,6 +296,10 @@ func handleConfig(option, value string) bool {
|
||||||
config.SudoLoop = true
|
config.SudoLoop = true
|
||||||
case "nosudoloop":
|
case "nosudoloop":
|
||||||
config.SudoLoop = false
|
config.SudoLoop = false
|
||||||
|
case "provides":
|
||||||
|
config.Provides = true
|
||||||
|
case "noprovides":
|
||||||
|
config.Provides = false
|
||||||
default:
|
default:
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ type Configuration struct {
|
||||||
Devel bool `json:"devel"`
|
Devel bool `json:"devel"`
|
||||||
CleanAfter bool `json:"cleanAfter"`
|
CleanAfter bool `json:"cleanAfter"`
|
||||||
GitClone bool `json:"gitclone"`
|
GitClone bool `json:"gitclone"`
|
||||||
|
Provides bool `json:"provides"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var version = "5.688"
|
var version = "5.688"
|
||||||
|
@ -152,6 +153,7 @@ func defaultSettings(config *Configuration) {
|
||||||
config.AnswerEdit = ""
|
config.AnswerEdit = ""
|
||||||
config.AnswerUpgrade = ""
|
config.AnswerUpgrade = ""
|
||||||
config.GitClone = true
|
config.GitClone = true
|
||||||
|
config.Provides = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Editor returns the preferred system editor.
|
// Editor returns the preferred system editor.
|
||||||
|
|
|
@ -9,8 +9,6 @@ import (
|
||||||
rpc "github.com/mikkeloscar/aur"
|
rpc "github.com/mikkeloscar/aur"
|
||||||
)
|
)
|
||||||
|
|
||||||
const PROVIDES = true
|
|
||||||
|
|
||||||
type target struct {
|
type target struct {
|
||||||
Db string
|
Db string
|
||||||
Name string
|
Name string
|
||||||
|
@ -228,10 +226,7 @@ func (dp *depPool) cacheAURPackages(_pkgs stringSet) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: config option, maybe --deepsearh but aurman uses that flag for
|
if config.Provides {
|
||||||
//something else already which might be confusing
|
|
||||||
//maybe --provides
|
|
||||||
if PROVIDES {
|
|
||||||
err := dp.findProvides(pkgs)
|
err := dp.findProvides(pkgs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue