mirror of
https://github.com/Jguer/yay
synced 2024-10-31 04:12:51 +00:00
Possible fix for #34
This commit is contained in:
parent
a0ee114577
commit
d8f1c382b1
2 changed files with 26 additions and 15 deletions
11
aur/aur.go
11
aur/aur.go
|
@ -154,10 +154,19 @@ func Upgrade(flags []string) error {
|
|||
}
|
||||
}
|
||||
|
||||
q, err := rpc.Info(keys)
|
||||
var q Query
|
||||
var j int
|
||||
for i = len(keys); i != 0; i = j {
|
||||
j = i - config.YayConf.RequestSplitN
|
||||
if j < 0 {
|
||||
j = 0
|
||||
}
|
||||
qtemp, err := rpc.Info(keys[j:i])
|
||||
q = append(q, qtemp...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
var buffer bytes.Buffer
|
||||
buffer.WriteString("\n")
|
||||
|
|
|
@ -35,6 +35,7 @@ type Configuration struct {
|
|||
Devel bool `json:"devel"`
|
||||
PacmanBin string `json:"pacmanbin"`
|
||||
PacmanConf string `json:"pacmanconf"`
|
||||
RequestSplitN int `json:"requestsplitn"`
|
||||
SearchMode int `json:"-"`
|
||||
SortMode int `json:"sortmode"`
|
||||
TarBin string `json:"tarbin"`
|
||||
|
@ -128,6 +129,7 @@ func defaultSettings(config *Configuration) {
|
|||
config.SortMode = BottomUp
|
||||
config.TarBin = "/usr/bin/bsdtar"
|
||||
config.TimeUpdate = false
|
||||
config.RequestSplitN = 150
|
||||
}
|
||||
|
||||
// Editor returns the preferred system editor.
|
||||
|
|
Loading…
Reference in a new issue