mirror of
https://github.com/Jguer/yay
synced 2024-09-14 13:51:12 +00:00
Possible fix for #34
This commit is contained in:
parent
a0ee114577
commit
d8f1c382b1
15
aur/aur.go
15
aur/aur.go
|
@ -154,9 +154,18 @@ func Upgrade(flags []string) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
q, err := rpc.Info(keys)
|
var q Query
|
||||||
if err != nil {
|
var j int
|
||||||
return err
|
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
|
var buffer bytes.Buffer
|
||||||
|
|
|
@ -27,18 +27,19 @@ const (
|
||||||
|
|
||||||
// Configuration stores yay's config.
|
// Configuration stores yay's config.
|
||||||
type Configuration struct {
|
type Configuration struct {
|
||||||
BuildDir string `json:"buildDir"`
|
BuildDir string `json:"buildDir"`
|
||||||
Editor string `json:"editor"`
|
Editor string `json:"editor"`
|
||||||
MakepkgBin string `json:"makepkgbin"`
|
MakepkgBin string `json:"makepkgbin"`
|
||||||
Shell string `json:"-"`
|
Shell string `json:"-"`
|
||||||
NoConfirm bool `json:"noconfirm"`
|
NoConfirm bool `json:"noconfirm"`
|
||||||
Devel bool `json:"devel"`
|
Devel bool `json:"devel"`
|
||||||
PacmanBin string `json:"pacmanbin"`
|
PacmanBin string `json:"pacmanbin"`
|
||||||
PacmanConf string `json:"pacmanconf"`
|
PacmanConf string `json:"pacmanconf"`
|
||||||
SearchMode int `json:"-"`
|
RequestSplitN int `json:"requestsplitn"`
|
||||||
SortMode int `json:"sortmode"`
|
SearchMode int `json:"-"`
|
||||||
TarBin string `json:"tarbin"`
|
SortMode int `json:"sortmode"`
|
||||||
TimeUpdate bool `json:"timeupdate"`
|
TarBin string `json:"tarbin"`
|
||||||
|
TimeUpdate bool `json:"timeupdate"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// YayConf holds the current config values for yay.
|
// YayConf holds the current config values for yay.
|
||||||
|
@ -128,6 +129,7 @@ func defaultSettings(config *Configuration) {
|
||||||
config.SortMode = BottomUp
|
config.SortMode = BottomUp
|
||||||
config.TarBin = "/usr/bin/bsdtar"
|
config.TarBin = "/usr/bin/bsdtar"
|
||||||
config.TimeUpdate = false
|
config.TimeUpdate = false
|
||||||
|
config.RequestSplitN = 150
|
||||||
}
|
}
|
||||||
|
|
||||||
// Editor returns the preferred system editor.
|
// Editor returns the preferred system editor.
|
||||||
|
|
Loading…
Reference in a new issue