fix(deps): fix regression on CombinedDepList

This commit is contained in:
jguer 2021-05-08 00:29:33 +02:00
parent 662c630a08
commit 8e6d098ff8
No known key found for this signature in database
GPG key ID: 6D6CC9BEA8556B35
2 changed files with 8 additions and 7 deletions

View file

@ -31,13 +31,9 @@ func GetOrder(dp *Pool, noDeps, noCheckDeps bool) *Order {
if aurPkg := dp.Aur[dep]; aurPkg != nil && pkgSatisfies(aurPkg.Name, aurPkg.Version, dep) {
do.orderPkgAur(aurPkg, dp, true, noDeps, noCheckDeps)
}
if aurPkg := dp.findSatisfierAur(dep); aurPkg != nil {
} else if aurPkg := dp.findSatisfierAur(dep); aurPkg != nil {
do.orderPkgAur(aurPkg, dp, true, noDeps, noCheckDeps)
}
if repoPkg := dp.findSatisfierRepo(dep); repoPkg != nil {
} else if repoPkg := dp.findSatisfierRepo(dep); repoPkg != nil {
do.orderPkgRepo(repoPkg, dp, true)
}
}

View file

@ -259,12 +259,17 @@ func (dp *Pool) cacheAURPackages(_pkgs stringset.StringSet, provides bool, split
return nil
}
// Compute dependency lists used in Package dep searching and ordering.
// Order sensitive TOFIX
func ComputeCombinedDepList(pkg *aur.Pkg, noDeps, noCheckDeps bool) [][]string {
combinedDepList := [][]string{pkg.MakeDepends}
combinedDepList := make([][]string, 0, 3)
if !noDeps {
combinedDepList = append(combinedDepList, pkg.Depends)
}
combinedDepList = append(combinedDepList, pkg.MakeDepends)
if !noCheckDeps {
combinedDepList = append(combinedDepList, pkg.CheckDepends)
}