Add support fot CheckDepends

Note when installing CheckDepends are still refered to as MakeDepends.
They are both only needed during build time so technically that is
correct. I don't see much of a use creating a third field so I'm leaving
it as is for now.
This commit is contained in:
morganamilo 2018-02-19 17:53:03 +00:00
parent c189a98018
commit 4a142425ec
No known key found for this signature in database
GPG Key ID: 6FE9E7996B0B082E
2 changed files with 3 additions and 2 deletions

View File

@ -118,7 +118,7 @@ func repoDepCatagoriesRecursive(pkg *alpm.Package, dc *depCatagories, dt *depTre
}
func depCatagoriesRecursive(pkg *rpc.Pkg, dc *depCatagories, dt *depTree, isMake bool, seen stringSet) {
for _, deps := range [2][]string{pkg.Depends, pkg.MakeDepends} {
for _, deps := range [3][]string{pkg.Depends, pkg.MakeDepends, pkg.CheckDepends} {
for _, _dep := range deps {
dep := getNameFromDep(_dep)
@ -276,7 +276,7 @@ func depTreeRecursive(dt *depTree, localDb *alpm.Db, syncDb alpm.DbList, isMake
}
//for each dep and makedep
for _, deps := range [2][]string{pkg.Depends, pkg.MakeDepends} {
for _, deps := range [3][]string{pkg.Depends, pkg.MakeDepends, pkg.CheckDepends} {
for _, versionedDep := range deps {
dep := getNameFromDep(versionedDep)

View File

@ -201,6 +201,7 @@ func PrintInfo(a *rpc.Pkg) {
fmt.Println(boldWhiteFg("Licenses :"), strings.Join(a.License, " "))
fmt.Println(boldWhiteFg("Depends On :"), strings.Join(a.Depends, " "))
fmt.Println(boldWhiteFg("Make Deps :"), strings.Join(a.MakeDepends, " "))
fmt.Println(boldWhiteFg("Check Deps :"), strings.Join(a.CheckDepends, " "))
fmt.Println(boldWhiteFg("Optional Deps :"), strings.Join(a.OptDepends, " "))
fmt.Println(boldWhiteFg("Conflicts With :"), strings.Join(a.Conflicts, " "))
fmt.Println(boldWhiteFg("Maintainer :"), a.Maintainer)