install.go: also install *-debug packages if built by makepkg

fixes #1190
This commit is contained in:
Ferdinand Bachmann 2020-02-16 23:20:53 +01:00 committed by J Guerreiro
parent ddd1cc35d2
commit 328c561230

View File

@ -1109,19 +1109,39 @@ func buildInstallPkgbuilds(dp *depPool, do *depOrder, srcinfos map[string]*gosrc
} }
} }
for _, split := range base { doAddTarget := func(name string, optional bool) error {
pkgdest, ok := pkgdests[split.Name] pkgdest, ok := pkgdests[name]
if !ok { if !ok {
return fmt.Errorf("Could not find PKGDEST for: %s", split.Name) if !optional {
return fmt.Errorf("Could not find PKGDEST for: %s", name)
} else {
return nil
}
} }
arguments.addTarget(pkgdest) arguments.addTarget(pkgdest)
if parser.existsArg("asdeps", "asdep") { if parser.existsArg("asdeps", "asdep") {
deps = append(deps, split.Name) deps = append(deps, name)
} else if parser.existsArg("asexplicit", "asexp") { } else if parser.existsArg("asexplicit", "asexp") {
exp = append(exp, split.Name) exp = append(exp, name)
} else if !dp.Explicit.Get(split.Name) && !localNamesCache.Get(split.Name) && !remoteNamesCache.Get(split.Name) { } else if !dp.Explicit.Get(name) && !localNamesCache.Get(name) && !remoteNamesCache.Get(name) {
deps = append(deps, split.Name) deps = append(deps, name)
}
return nil
}
for _, split := range base {
var err error
err = doAddTarget(split.Name, false)
if err != nil {
return err
}
err = doAddTarget(split.Name+"-debug", true)
if err != nil {
return err
} }
} }