forked from ALHP/ALHP.GO
skip haskell packages for now until dependency trees are a thing #11
This commit is contained in:
32
main.go
32
main.go
@@ -92,9 +92,23 @@ func check(e error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func contains(s []string, str string) bool {
|
func contains(s interface{}, str string) bool {
|
||||||
if i := find(s, str); i != -1 {
|
switch v := s.(type) {
|
||||||
return true
|
case []string:
|
||||||
|
if i := find(v, str); i != -1 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
case []srcinfo.ArchString:
|
||||||
|
var n []string
|
||||||
|
for _, as := range v {
|
||||||
|
n = append(n, as.Value)
|
||||||
|
}
|
||||||
|
|
||||||
|
if i := find(n, str); i != -1 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
@@ -390,13 +404,23 @@ func (b *BuildManager) parseWorker() {
|
|||||||
}
|
}
|
||||||
pkg.Srcinfo = info
|
pkg.Srcinfo = info
|
||||||
|
|
||||||
if contains(info.Arch, "any") || contains(conf.Blacklist, info.Pkgbase) {
|
if contains(info.Arch, "any") || contains(conf.Blacklist, info.Pkgbase) || contains(info.MakeDepends, "ghc") {
|
||||||
log.Infof("Skipped %s: blacklisted or any-Package", info.Pkgbase)
|
log.Infof("Skipped %s: blacklisted or any-Package", info.Pkgbase)
|
||||||
b.toPurge <- pkg
|
b.toPurge <- pkg
|
||||||
b.parseWG.Done()
|
b.parseWG.Done()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skip Haskell packages for now, as we are facing linking problems with them,
|
||||||
|
// most likely caused by not having a dependency tree implemented yet and building at random.
|
||||||
|
// https://git.harting.dev/anonfunc/ALHP.GO/issues/11
|
||||||
|
if contains(info.MakeDepends, "ghc") || contains(info.MakeDepends, "haskell-ghc") || contains(info.Depends, "ghc") || contains(info.Depends, "haskell-ghc") {
|
||||||
|
log.Infof("Skipped %s: haskell package", info.Pkgbase)
|
||||||
|
b.toPurge <- pkg
|
||||||
|
b.parseWG.Done()
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if isPkgFailed(pkg) {
|
if isPkgFailed(pkg) {
|
||||||
log.Infof("Skipped %s: failed build", info.Pkgbase)
|
log.Infof("Skipped %s: failed build", info.Pkgbase)
|
||||||
b.toPurge <- pkg
|
b.toPurge <- pkg
|
||||||
|
Reference in New Issue
Block a user