mirror of
https://github.com/Jguer/yay
synced 2024-10-31 13:42:27 +00:00
Add Basses to depOrder
This should act exaclty like depCatagories.Basses
This commit is contained in:
parent
b2d3eb5c49
commit
b585cec123
1 changed files with 10 additions and 13 deletions
23
depOrder.go
23
depOrder.go
|
@ -14,8 +14,8 @@ import (
|
|||
type depOrder struct {
|
||||
Aur []*rpc.Pkg
|
||||
Repo []*alpm.Package
|
||||
Missing []string
|
||||
Runtime stringSet
|
||||
Bases map[string][]*rpc.Pkg
|
||||
}
|
||||
|
||||
func (do *depOrder) String() string {
|
||||
|
@ -57,8 +57,8 @@ func makeDepOrder() *depOrder {
|
|||
return &depOrder{
|
||||
make([]*rpc.Pkg, 0),
|
||||
make([]*alpm.Package, 0),
|
||||
make([]string, 0),
|
||||
make(stringSet),
|
||||
make(map[string][]*rpc.Pkg, 0),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,6 +78,8 @@ func getDepOrder(dp *depPool) *depOrder {
|
|||
}
|
||||
}
|
||||
|
||||
do.getBases()
|
||||
|
||||
return do
|
||||
}
|
||||
|
||||
|
@ -122,17 +124,12 @@ func (do *depOrder) orderPkgRepo(pkg *alpm.Package, dp *depPool, runtime bool) {
|
|||
})
|
||||
}
|
||||
|
||||
func (do *depOrder) getMakeOnlyRepo() stringSet {
|
||||
makeOnly := make(stringSet)
|
||||
|
||||
for _, pkg := range do.Repo {
|
||||
if !do.Runtime.get(pkg.Name()) {
|
||||
makeOnly.set(pkg.Name())
|
||||
func (do *depOrder) getBases() {
|
||||
for _, pkg := range do.Aur {
|
||||
if _, ok := do.Bases[pkg.PackageBase]; !ok {
|
||||
do.Bases[pkg.PackageBase] = make([]*rpc.Pkg, 0)
|
||||
}
|
||||
|
||||
do.Bases[pkg.PackageBase] = append(do.Bases[pkg.PackageBase], pkg)
|
||||
}
|
||||
|
||||
return makeOnly
|
||||
}
|
||||
|
||||
func (do *depOrder) checkMissing() {
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue