mirror of
https://github.com/Jguer/yay.git
synced 2024-11-06 17:17:22 +01:00
use aurInfo() for -Ps
This commit is contained in:
parent
3fb77b1d72
commit
e71d66f3c6
48
print.go
48
print.go
@ -256,53 +256,7 @@ func localStatistics() error {
|
|||||||
biggestPackages()
|
biggestPackages()
|
||||||
fmt.Println(boldCyanFg("==========================================="))
|
fmt.Println(boldCyanFg("==========================================="))
|
||||||
|
|
||||||
var q aurQuery
|
aurInfo(remoteNames)
|
||||||
var j int
|
|
||||||
for i := len(remoteNames); i != 0; i = j {
|
|
||||||
j = i - config.RequestSplitN
|
|
||||||
if j < 0 {
|
|
||||||
j = 0
|
|
||||||
}
|
|
||||||
qtemp, err := rpc.Info(remoteNames[j:i])
|
|
||||||
q = append(q, qtemp...)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var outcast []string
|
|
||||||
for _, s := range remoteNames {
|
|
||||||
found := false
|
|
||||||
for _, i := range q {
|
|
||||||
if s == i.Name {
|
|
||||||
found = true
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if !found {
|
|
||||||
outcast = append(outcast, s)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, res := range q {
|
|
||||||
if res.Maintainer == "" {
|
|
||||||
fmt.Println(boldRedFgBlackBg(arrow+"Warning:"),
|
|
||||||
boldYellowFgBlackBg(res.Name), whiteFgBlackBg("is orphaned"))
|
|
||||||
}
|
|
||||||
if res.OutOfDate != 0 {
|
|
||||||
fmt.Println(boldRedFgBlackBg(arrow+"Warning:"),
|
|
||||||
boldYellowFgBlackBg(res.Name), whiteFgBlackBg("is out-of-date in AUR"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, res := range outcast {
|
|
||||||
fmt.Println(boldRedFgBlackBg(arrow+"Warning:"),
|
|
||||||
boldYellowFgBlackBg(res), whiteFgBlackBg("is not available in AUR"))
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user